ansible-role-postgresql/handlers/main.yml

47 lines
1.5 KiB
YAML

---
- name: Restart postgresql
service: name=postgresql state=restarted
when: ansible_distribution_file_variety == "Debian"
- name: Reload postgresql
service: name=postgresql state=reloaded
when: ansible_distribution_file_variety == "Debian"
- name: Reload pgpool2
service: name=pgpool2 state=reloaded
when: ansible_distribution_file_variety == "Debian"
ignore_errors: True
- name: Restart pgpool2
service: name=pgpool2 state=restarted
when: ansible_distribution_file_variety == "Debian"
- name: Restart postgresql with pgpool config
service: name=postgresql state=restarted
when:
- ansible_distribution_file_variety == "Debian"
- psql_restart_after_wal_enabling
- name: Restart postgresql
service: name='postgresql-{{ psql_version }}' state=restarted
when: ansible_distribution_file_variety == "RedHat"
- name: Reload postgresql
service: name='postgresql-{{ psql_version }}' state=reloaded
when: ansible_distribution_file_variety == "RedHat"
- name: Reload pgpool2
service: name='pgpool2-{{ psql_version }}' state=reloaded
when: ansible_distribution_file_variety == "RedHat"
ignore_errors: True
- name: Restart pgpool2
service: name='pgpool2-{{ psql_version }}' state=restarted
when: ansible_distribution_file_variety == "RedHat"
- name: Restart postgresql with pgpool config
service: name='postgresql-{{ psql_version }}' state=restarted
when:
- ansible_distribution_file_variety == "RedHat"
- psql_restart_after_wal_enabling