paulbsd-salt/states/zabbix/agent/scripts.sls
2021-08-16 09:59:37 +02:00

18 lines
508 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 }}
{%- 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
{%- endfor %}