blob: 22079cefcbc5fa6176a49e5e1dd8d26b7ef975fa [file] [log] [blame]
---
# tasks file for apigee-opdk-setup-postgres-standby
- name: Stop postgres
shell: '{{ apigee_service }} apigee-postgresql stop'
- name: Remove Postgres data directory
become: true
file:
path: '{{ apigee_installation_home }}/data/apigee-postgresql/pgdata'
state: absent
- block:
- name: Postgres replication standby
shell: '{{ apigee_service }} apigee-postgresql setup-replication-on-standby -f {{ opdk_installation_config_file }}'
register: replication_output
rescue:
- name: Determine if max_wal_senders value must be updated
set_fact:
update_max_wal_settings: "{{ replication_output.stdout | search('number of requested standby connections exceeds max_wal_senders') }}"
- name: Validate postgres replication standby
shell: '{{ apigee_service }} apigee-postgresql postgres-check-standby'