vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.69k stars 411 forks source link

pgpass: do not output the contents to the log #469

Closed vitabaks closed 1 year ago

vitabaks commented 1 year ago

do not output the contents (passwords) to the ansible log for task "Configure a password"

To hide the contents in diff when using the ansible ansible.builtin.copy, set the no_log parameter to true.

Fixed:

TASK [pgpass : Configure a password file (/var/lib/postgresql/.pgpass)] ********
--- before
+++ after: /root/.ansible/tmp/ansible-local-30xva_jds2/tmpbi95bhut
@@ -0,0 +1,2 @@
+localhost:5432:*:postgres:SECRET-PASSWORD
+192.168.12.216:5432:*:postgres:SECRET-PASSWORD2
changed: [192.168.12.216]