Align the parameters convetions.
This commit is contained in:
parent
fd68e8d04a
commit
e8e9e32f82
|
@ -99,17 +99,17 @@ psql_streaming_replication_hosts:
|
||||||
psql_streaming_replication_user: psql_replica
|
psql_streaming_replication_user: psql_replica
|
||||||
#psql_streaming_replication_pwd: 'use a vault'
|
#psql_streaming_replication_pwd: 'use a vault'
|
||||||
psql_streaming_replication_config:
|
psql_streaming_replication_config:
|
||||||
- { name: 'wal_level', value: 'replica' }
|
- { name: 'wal_level', value: 'replica', set: 'True' }
|
||||||
- { name: 'max_wal_senders', value: '10' }
|
- { name: 'max_wal_senders', value: '10', set: 'True' }
|
||||||
- { name: 'wal_keep_size', value: '0' }
|
- { name: 'wal_keep_size', value: '0', set: 'True' }
|
||||||
- { name: 'max_slot_wal_keep_size', value: '50MB' }
|
- { name: 'max_slot_wal_keep_size', value: '50MB', set: 'True' }
|
||||||
- { name: 'wal_compression', value: 'on' }
|
- { name: 'wal_compression', value: 'on', set: 'True' }
|
||||||
- { name: 'wal_log_hints', value: 'on' }
|
- { name: 'wal_log_hints', value: 'on', set: 'True' }
|
||||||
- { name: 'hot_standby', value: 'on' }
|
- { name: 'hot_standby', value: 'on', set: 'True' }
|
||||||
- { name: 'archive_mode', value: 'always' }
|
- { name: 'archive_mode', value: 'always', set: 'True' }
|
||||||
- { name: 'archive_command', value: "cp %p {{ psql_wal_archiving_log_dir }}/%f" }
|
- { name: 'archive_command', value: "cp %p {{ psql_wal_archiving_log_dir }}/%f", set: 'True' }
|
||||||
- { name: 'restore_command', value: "cp {{ psql_wal_archiving_log_dir }}/%f %p" }
|
- { name: 'restore_command', value: "cp {{ psql_wal_archiving_log_dir }}/%f %p", set: 'True' }
|
||||||
- { name: 'archive_cleanup_command', value: "pg_archivecleanup {{ psql_wal_archiving_log_dir }} %r" }
|
- { name: 'archive_cleanup_command', value: "pg_archivecleanup {{ psql_wal_archiving_log_dir }} %r", set: 'True' }
|
||||||
|
|
||||||
# SSL as a special case
|
# SSL as a special case
|
||||||
psql_enable_ssl: False
|
psql_enable_ssl: False
|
||||||
|
@ -121,13 +121,13 @@ psql_ssl_cert_file: '{% if postgresql_letsencrypt_managed %}/var/lib/acme/live/{
|
||||||
# In CentOS/RHEL is /etc/pki/tls/cert.pem
|
# In CentOS/RHEL is /etc/pki/tls/cert.pem
|
||||||
psql_ssl_ca_file: '/etc/ssl/certs/ca-certificates.crt'
|
psql_ssl_ca_file: '/etc/ssl/certs/ca-certificates.crt'
|
||||||
psql_conf_ssl_parameters:
|
psql_conf_ssl_parameters:
|
||||||
- { name: 'ssl', value: 'true' }
|
- { name: 'ssl', value: 'true', set: 'True' }
|
||||||
- { name: 'ssl_cert_file', value: '{{ psql_ssl_cert_file }}' }
|
- { name: 'ssl_cert_file', value: '{{ psql_ssl_cert_file }}', set: 'True' }
|
||||||
- { name: 'ssl_key_file', value: '{{ psql_ssl_privkey_file }}' }
|
- { name: 'ssl_key_file', value: '{{ psql_ssl_privkey_file }}', set: 'True' }
|
||||||
- { name: 'ssl_ca_file', value: '{{ psql_ssl_ca_file }}' }
|
- { name: 'ssl_ca_file', value: '{{ psql_ssl_ca_file }}', set: 'True' }
|
||||||
|
|
||||||
psql_conf_disable_ssl_parameters:
|
psql_conf_disable_ssl_parameters:
|
||||||
- { name: 'ssl', value: 'false' }
|
- { name: 'ssl', value: 'false', set: 'True' }
|
||||||
|
|
||||||
psql_set_shared_memory: False
|
psql_set_shared_memory: False
|
||||||
psql_sysctl_file: 30-postgresql-shm.conf
|
psql_sysctl_file: 30-postgresql-shm.conf
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
- name: postgresql-streaming-replication | Setup the streaming replication on the primary
|
- name: postgresql-streaming-replication | Setup the streaming replication on the primary
|
||||||
community.postgresql.postgresql_set:
|
community.postgresql.postgresql_set:
|
||||||
name: '{{ item.name }}'
|
name: '{{ item.name }}'
|
||||||
value: "{{ item.value }}"
|
value: "{% if item.set %}{{ item.value }}{% else %}default{% endif %}"
|
||||||
loop: '{{ psql_streaming_replication_config }}'
|
loop: '{{ psql_streaming_replication_config }}'
|
||||||
when: postgresql_streaming_replication_primary_node == ansible_fqdn
|
when: postgresql_streaming_replication_primary_node == ansible_fqdn
|
||||||
notify: Restart postgresql
|
notify: Restart postgresql
|
||||||
|
|
Loading…
Reference in New Issue