--- {%- from "zabbix/map.jinja" import zabbix with context %} zabbix-config-dir: file.directory: - name: /etc/zabbix - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.user }} - mode: 755 - watch_in: - service: zabbix-agent-service zabbix-log-dir: file.directory: - name: /var/log/zabbix - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.user }} - mode: 755 - watch_in: - service: zabbix-agent-service zabbix-agent-config-dir: file.directory: - name: /etc/zabbix/zabbix_agentd.conf.d - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.user }} - mode: 755 - watch_in: - service: zabbix-agent-service zabbix-agent-config: file.managed: - name: /etc/zabbix/zabbix_agentd.conf - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.user }} - source: salt://zabbix/templates/zabbix_agentd.conf.j2 - template: jinja - watch_in: - service: zabbix-agent-service {% if zabbix.agent.config.TLSPSKFile is iterable %} zabbix-agent-tlspsk-file: file.managed: - name: {{ zabbix.agent.config.TLSPSKFile }} - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.user }} - contents: {{ zabbix.agent.psk }} - create: true - watch_in: - service: zabbix-agent-service {% endif %} zabbix-userparameters: file.managed: - name: /etc/zabbix/zabbix_agentd.conf.d/user_parameters.conf - source: salt://zabbix/templates/user_parameters.j2 - user: {{ zabbix.agent.user }} - group: {{ zabbix.agent.user }} - mode: 0755 - template: jinja - watch_in: - service: zabbix-agent-service