Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define postgresql_privs due to priv deprecated in postgresql_user module | Zabbix Proxy #1215

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions roles/zabbix_proxy/tasks/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@
name: "{{ zabbix_proxy_dbuser }}"
password: "{{ ('md5' + (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5')) if zabbix_proxy_dbpassword_hash_method == 'md5' else zabbix_proxy_dbpassword }}"
port: "{{ zabbix_proxy_dbport }}"
priv: ALL
state: present
encrypted: true

- name: PostgreSQL | Delegated | GRANT ALL PRIVILEGES ON SCHEMA public TO {{ zabbix_proxy_dbuser }}
community.postgresql.postgresql_privs:
db: "{{ zabbix_proxy_dbname }}"
role: "{{ zabbix_proxy_dbuser }}"
privs: ALL
type: schema
objs: public
state: present
port: "{{ zabbix_proxy_dbport }}"
become: true
become_user: postgres
delegate_to: "{{ delegated_dbhost }}"
Expand Down Expand Up @@ -63,9 +72,19 @@
name: "{{ zabbix_proxy_dbuser }}"
password: "{{ ('md5' + (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5')) if zabbix_proxy_dbpassword_hash_method == 'md5' else zabbix_proxy_dbpassword }}"
port: "{{ zabbix_proxy_dbport }}"
priv: ALL
state: present
encrypted: true
- name: PostgreSQL | Remote | GRANT ALL PRIVILEGES ON SCHEMA public TO {{ zabbix_proxy_dbuser }}
community.postgresql.postgresql_privs:
login_host: "{{ zabbix_proxy_pgsql_login_host | default(omit) }}"
login_user: "{{ zabbix_proxy_pgsql_login_user | default(omit) }}"
login_password: "{{ zabbix_proxy_pgsql_login_password | default(omit) }}"
db: "{{ zabbix_proxy_dbname }}"
role: "{{ zabbix_proxy_dbuser }}"
type: schema
objs: public
state: present
port: "{{ zabbix_proxy_dbport }}"
when:
- zabbix_proxy_database_creation
- zabbix_proxy_pgsql_login_host is defined
Expand Down
Loading