Optionally print the psql_db_data.

This commit is contained in:
Andrea Dell'Amico 2024-03-25 13:23:08 +01:00
parent d14fd11cdb
commit 113bb9ad8a
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,7 @@ psql_conf_base_dir: '/etc/postgresql'
psql_conf_default_dir: '{{ psql_conf_base_dir }}/{{ psql_version }}/main'
psql_conf_dir: "{{ psql_conf_default_dir }}"
psql_force_ssl_client_connection: false
pgsql_show_db_data: false
#psql_db_data:
# Example of line needed to create a db, create the user that owns the db, manage the db accesses (used by iptables too). All the fields are mandatory.

View File

@ -1,5 +1,10 @@
---
- block:
- name: Print the psql_db_data values
ansible.builtin.debug:
var: psql_db_data
no_log: "{{ pgsql_show_db_data }}"
- name: Add a user for the postgresql DBs
become: True
become_user: postgres
@ -32,5 +37,5 @@
delegate_to: "{{ item.db_host }}"
when: item.db_host is defined
run_once: True
tags: [ 'postgresql', 'postgres', 'pg_db', 'pg_user' ]
run_once: true
tags: ['postgresql', 'postgres', 'pg_db', 'pg_user']