Update to 2022-01-25 13:00

This commit is contained in:
Daniel Berteaud
2022-01-25 13:00:05 +01:00
parent bc89de8f63
commit 44ee2cb941
3 changed files with 25 additions and 0 deletions

View File

@@ -108,6 +108,26 @@
with_items: "{{ pg_roles }}"
tags: pg
- when: pg_monitoring_user is defined and pg_monitoring_pass is defined
block:
- name: Create monitoring user
postgresql_user:
name: "{{ pg_monitoring_user }}"
password: "{{ pg_monitoring_pass }}"
- name: Grant privileges for monitoring user
postgresql_privs:
type: function
state: present
privs: EXECUTE
schema: pg_catalog
objs: pg_ls_dir(text),pg_stat_file(text),pg_ls_waldir()
role: "{{ pg_monitoring_user }}"
database: postgres
become_user: postgres
tags: pg,zabbix
- name: Create databases
postgresql_db:
name: "{{ item.name }}"