From f7f5e4d2e8c1ee8da129ec79c9a4c651907c35f0 Mon Sep 17 00:00:00 2001 From: shtlrs Date: Thu, 16 May 2024 21:50:53 +0200 Subject: configure hba rules separately --- ansible/roles/postgres/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ansible/roles/postgres/tasks') diff --git a/ansible/roles/postgres/tasks/main.yml b/ansible/roles/postgres/tasks/main.yml index 850a633..fb026c1 100644 --- a/ansible/roles/postgres/tasks/main.yml +++ b/ansible/roles/postgres/tasks/main.yml @@ -49,10 +49,10 @@ insertafter: "# Put your actual configuration here" marker: "# {mark} ANSIBLE MANAGED HBA CONF BLOCK" block: | - {% for db in postgres_databases %} - host {{ db.name }} {{ db.owner }} all scram-sha-256 + {% for rule in postgres_hba_rules %} + {{ rule.conn_type }} {{ rule.database }} {{ rule.user }} {{ rule.address }} {{ rule.method }} {% endfor %} - loop: "{{ postgres_databases }}" + loop: "{{ postgres_hba_rules }}" notify: - Reload the postgres service tags: -- cgit v1.2.3