New ACL settings. postgres port for pg_basebackup.
This commit is contained in:
parent
9f188f044a
commit
b5a43c3acd
|
@ -34,7 +34,7 @@
|
||||||
- ('{{ pgpool_recovery_user }}' != 'postgres')
|
- ('{{ pgpool_recovery_user }}' != 'postgres')
|
||||||
- pgpool_recovery_user_pwd is defined
|
- pgpool_recovery_user_pwd is defined
|
||||||
|
|
||||||
- name: Configure the replication user permissions on deb
|
- name: Configure the global replication user permissions on deb when no password has been defined
|
||||||
postgresql_pg_hba:
|
postgresql_pg_hba:
|
||||||
dest: '{{ psql_conf_dir }}/pg_hba.conf'
|
dest: '{{ psql_conf_dir }}/pg_hba.conf'
|
||||||
contype: host
|
contype: host
|
||||||
|
@ -52,6 +52,24 @@
|
||||||
- pgpool_recovery_user_pwd is not defined
|
- pgpool_recovery_user_pwd is not defined
|
||||||
notify: Reload postgresql
|
notify: Reload postgresql
|
||||||
|
|
||||||
|
- name: Configure the replication user permissions for the replication DB on deb when no password has been defined
|
||||||
|
postgresql_pg_hba:
|
||||||
|
dest: '{{ psql_conf_dir }}/pg_hba.conf'
|
||||||
|
contype: host
|
||||||
|
users: '{{ pgpool_recovery_user }}'
|
||||||
|
address: '{{ item.1 }}'
|
||||||
|
databases: 'replication'
|
||||||
|
method: 'trust'
|
||||||
|
state: present
|
||||||
|
with_subelements:
|
||||||
|
- '{{ psql_db_data | default([]) }}'
|
||||||
|
- allowed_hosts
|
||||||
|
when:
|
||||||
|
- psql_db_data is defined
|
||||||
|
- item.1 is defined
|
||||||
|
- pgpool_recovery_user_pwd is not defined
|
||||||
|
notify: Reload postgresql
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
- name: Create the ssh keys for the recovery user
|
- name: Create the ssh keys for the recovery user
|
||||||
|
|
|
@ -39,7 +39,7 @@ logger "pgpool_recovery_1: touched the backup_in_progress file"
|
||||||
|
|
||||||
# Perform a backup of the database.
|
# Perform a backup of the database.
|
||||||
ssh -T $RECOVERY_TARGET \
|
ssh -T $RECOVERY_TARGET \
|
||||||
"pg_basebackup -h $MASTER_HOST -D $RECOVERY_DATA"
|
"pg_basebackup -h $MASTER_HOST -p {{ psql_db_port }} -D $RECOVERY_DATA"
|
||||||
|
|
||||||
logger "pgpool_recovery_1: backup of the database from $MASTER_HOST to $RECOVERY_TARGET"
|
logger "pgpool_recovery_1: backup of the database from $MASTER_HOST to $RECOVERY_TARGET"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue