---
# file: roles/postgres/handlers/main.yml

- name: "reload postgres"
  systemd:
    name: "postgresql@{{ pg_version }}-{{ pg_cluster_name }}.service"
    state: reloaded
  when: ansible_service_mgr == "systemd"

- name: "restart postgres"
  systemd:
    name: "postgresql@{{ pg_version }}-{{ pg_cluster_name }}.service"
    state: restarted
  when: ansible_service_mgr == "systemd"

- name: restart zabbix_agent
  systemd:
    name: zabbix-agent
    state: restarted

- name: "systemctl daemon-reload"
  systemd:
    daemon_reload: true
