From 3098f4cbeaaaddaaba4aa82aad41c76c2d50fb02 Mon Sep 17 00:00:00 2001 From: meaz Date: Sat, 16 Dec 2023 18:35:09 +0100 Subject: [PATCH] Fix #719 by restarting services --- tasks/install_agent.yml | 4 ++++ tasks/update.yml | 3 +++ 2 files changed, 7 insertions(+) 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: