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