diff --git a/defaults/main.yml b/defaults/main.yml index 4ad73f3..b6b1c26 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,6 +9,7 @@ postgresql: allowed_hosts: {} dbs: {} users: {} + privs: [] distro_pg_version_mapping: stretch: "9.6" diff --git a/tasks/main.yml b/tasks/main.yml index 5f6530c..1e3f525 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -45,6 +45,12 @@ become: true with_dict: "{{ postgresql.dbs }}" +- name: add postgresql privs + community.postgresql.postgresql_privs: "{{ item }}" + become_user: postgres + become: true + loop: "{{ postgresql.privs }}" + - name: add vacuum cronjob cron: name: db maintenance