From 942d552f28953b2f07b514500f4476b7181b461e Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 11 Mar 2023 09:54:27 +0100 Subject: [PATCH] updated zabbix state --- states/zabbix/agent/install.sls | 2 ++ states/zabbix/agent/scripts.sls | 4 ++++ states/zabbix/server/config.sls | 2 ++ 3 files changed, 8 insertions(+) diff --git a/states/zabbix/agent/install.sls b/states/zabbix/agent/install.sls index 3b9a9f3..61a24a0 100644 --- a/states/zabbix/agent/install.sls +++ b/states/zabbix/agent/install.sls @@ -3,3 +3,5 @@ zabbix-agent-pkgs: pkg.latest: - pkgs: {{ zabbix.agent.pkgs }} + - watch_in: + - service: zabbix-agent-service diff --git a/states/zabbix/agent/scripts.sls b/states/zabbix/agent/scripts.sls index 4b42b49..68856a4 100644 --- a/states/zabbix/agent/scripts.sls +++ b/states/zabbix/agent/scripts.sls @@ -5,6 +5,8 @@ zabbix-script-dir: - name: /etc/zabbix/scripts - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.group }} + - watch_in: + - service: zabbix-agent-service {% for key, value in zabbix.agent.scripts.items() -%} zabbix-script-{{ key }}: @@ -14,4 +16,6 @@ zabbix-script-{{ key }}: - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.group }} - mode: 0755 + - watch_in: + - service: zabbix-agent-service {% endfor -%} diff --git a/states/zabbix/server/config.sls b/states/zabbix/server/config.sls index c1fe28b..249bf5f 100644 --- a/states/zabbix/server/config.sls +++ b/states/zabbix/server/config.sls @@ -7,3 +7,5 @@ zabbix-server-config: - user: {{ zabbix.server.user }} - group: {{ zabbix.server.group }} - template: jinja + - watch_in: + - service: zabbix-server-service