Hi,
I am trying to create a sub-task to update an existing table in a file:
/var/lib/pgsql/10/data/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 ident
host replication all ::1/128 ident
I wish to change this table to the following:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 ident
host replication all ::1/128 ident
My attempt:
- copy:
dest: /var/lib/pgsql/10/data/pg_hba.conf
content: |
# TYPE DATABASE USER ADDRESS METHOD
local all all peer
host all postgres localhost trust
host all postgres 127.0.0.1/32 trust
host postcodesiodb postcodesio 127.0.0.1/32 md5
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
Should this work or am I missing something?
Any help much appreciated.
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-devel/55946a12-45ed-495c-a150-9967b320c79fn%40googlegroups.com.