diff --git a/tasks/install_agent.yml b/tasks/install_agent.yml index 979f473..1026308 100644 --- a/tasks/install_agent.yml +++ b/tasks/install_agent.yml @@ -24,6 +24,8 @@ force: 'yes' version: '{{ zabbix_scripts_version }}' when: zabbix_scripts_deploy == 'true' + notify: + - restart zabbix_agent - name: '[Agent] - Ensure config dir path exists' file: @@ -36,6 +38,8 @@ src: 'zabbix-scripts.cfg.j2' dest: '/var/local/container-scripts/zabbix-scripts.cfg' when: zabbix_scripts_deploy == 'true' + notify: + - restart zabbix_agent - name: "[Agent] - Make sure the service is enabled" systemd: diff --git a/tasks/update.yml b/tasks/update.yml index 8e1065b..c984b96 100644 --- a/tasks/update.yml +++ b/tasks/update.yml @@ -11,6 +11,7 @@ state: stopped when: installed_version.stdout != zabbix_version ignore_errors: true # needed otherwise there is an error on first installation as it doesn't exist + notify: restart zabbix_server - name: "[Update] - Make sure the agent is stopped" systemd: @@ -18,6 +19,7 @@ state: stopped when: installed_version != zabbix_version ignore_errors: true # needed otherwise there is an error on first installation as it doesn't exist + notify: restart zabbix_agent - name: "[Update] - Make sure the proxy is stopped" systemd: @@ -25,6 +27,7 @@ state: stopped when: installed_version != zabbix_version ignore_errors: true # needed otherwise there is an error on first installation as it doesn't exist + notify: restart zabbix_proxy - name: '[Update] - Remove current repository' file: