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