ansible/test/integration/targets/setup_postgresql_replication/handlers/main.yml
Andrey Klychkov 22fe622589 postgresql_subscription: new module (#63661)
* postgresql_subscription: setup master-standby cluster into one container

* postgresql_subscription: setup master-standby cluster into one container, fix

* postgresql_subscription: setup master-standby cluster into one container, set up publication

* postgresql_subscription: setup master-standby cluster into one container, add module template

* postgresql_subscription: setup master-standby cluster into one container, fix tests

* postgresql_subscription: setup master-standby cluster into one container, create subscr via shell

* postgresql_subscription: setup replication, state stat

* postgresql_subscription: add basic present mode

* postgresql_subscription: add assertions

* postgresql_subscription: add samples

* postgresql_subscription: state absent, cascade

* postgresql_subscription: add owner param

* postgresql_subscription: update

* postgresql_subscription: refresh

* postgresql_subscription: doc, warns

* postgresql_subscription: relinfo

* postgresql_subscription: fixes

* postgresql_subscription: fix CI tests
2019-11-06 14:19:30 +00:00

23 lines
613 B
YAML

- name: Stop services
become: yes
become_user: '{{ pg_user }}'
shell: '{{ pg_ctl }} -D {{ item.datadir }} -o "-p {{ item.port }}" -m immediate stop'
loop:
- { datadir: '{{ master_data_dir }}', port: '{{ master_port }}' }
- { datadir: '{{ replica_data_dir }}', port: '{{ replica_port }}' }
listen: stop postgresql
- name: Remove packages
apt:
name: '{{ packages_to_remove }}'
state: absent
listen: cleanup postgresql
- name: Remove FS objects
file:
state: absent
path: "{{ item }}"
loop:
- "{{ master_root_dir }}"
- "{{ replica_root_dir }}"
listen: cleanup postgresql