paulbsd-salt/states/zabbix/agent/scripts.sls
Paul Lecuq 942d552f28
All checks were successful
continuous-integration/drone/push Build is passing
updated zabbix state
2023-03-11 09:54:27 +01:00

22 lines
616 B
Plaintext

---
{%- from "zabbix/map.jinja" import zabbix with context %}
zabbix-script-dir:
file.directory:
- 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 }}:
file.managed:
- name: /etc/zabbix/scripts/{{ value.name }}
- source: salt://zabbix/scripts/{{ value.name }}
- user: {{ zabbix.agent.user }}
- group: {{ zabbix.agent.group }}
- mode: 0755
- watch_in:
- service: zabbix-agent-service
{% endfor -%}