paulbsd-salt/states/zabbix/agent2/scripts.sls
Paul 56f27dc9d9
All checks were successful
continuous-integration/drone/push Build is passing
updated zabbix state
2024-09-28 14:24:54 +02:00

22 lines
623 B
Plaintext

---
{%- from "zabbix/map.jinja" import zabbix with context %}
zabbix-script-dir:
file.directory:
- name: /etc/zabbix/scripts
- user: {{ zabbix.agent2.user }}
- group: {{ zabbix.agent2.group }}
- watch_in:
- service: zabbix-agent2-service
{% for key, value in zabbix.agent2.scripts.items() -%}
zabbix-script-{{ key }}:
file.managed:
- name: /etc/zabbix/scripts/{{ value.name }}
- source: salt://zabbix/scripts/{{ value.name }}
- user: {{ zabbix.agent2.user }}
- group: {{ zabbix.agent2.group }}
- mode: 0755
- watch_in:
- service: zabbix-agent2-service
{% endfor -%}