2020-11-04 23:05:21 +01:00
|
|
|
---
|
|
|
|
{%- from "zabbix/map.jinja" import zabbix with context %}
|
2021-08-19 19:21:06 +02:00
|
|
|
zabbix-script-dir:
|
2020-11-04 23:05:21 +01:00
|
|
|
file.directory:
|
|
|
|
- name: /etc/zabbix/scripts
|
2021-08-16 09:59:37 +02:00
|
|
|
- user: {{ zabbix.agent.user }}
|
|
|
|
- group: {{ zabbix.agent.group }}
|
2020-11-04 23:05:21 +01:00
|
|
|
|
2021-08-19 19:21:06 +02:00
|
|
|
{% for key, value in zabbix.agent.scripts.items() -%}
|
|
|
|
zabbix-script-{{ key }}:
|
2020-11-04 23:05:21 +01:00
|
|
|
file.managed:
|
|
|
|
- name: /etc/zabbix/scripts/{{ value.name }}
|
|
|
|
- source: salt://zabbix/scripts/{{ value.name }}
|
2021-08-16 09:59:37 +02:00
|
|
|
- user: {{ zabbix.agent.user }}
|
|
|
|
- group: {{ zabbix.agent.group }}
|
2020-11-04 23:05:21 +01:00
|
|
|
- mode: 0755
|
2021-08-19 19:21:06 +02:00
|
|
|
{% endfor -%}
|