mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 00:05:44 +02:00
Update to 2022-01-25 13:00
This commit is contained in:
@@ -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 }}"
|
||||
|
Reference in New Issue
Block a user