From ee91be53302c6a485dc65eaf3c89db59862bc193 Mon Sep 17 00:00:00 2001 From: Julian Rother Date: Wed, 29 Jan 2025 16:36:45 +0100 Subject: [PATCH] Add (very basic) postgresql.privs option --- defaults/main.yml | 1 + tasks/main.yml | 6 ++++++ 2 files changed, 7 insertions(+) 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