paulbsd-salt/states/zabbix/agent2/scripts.sls

22 lines
623 B
Plaintext
Raw Normal View History

2024-09-28 14:24:54 +02:00
---
{%- 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 -%}