2020-10-25 16:35:57 +01:00
|
|
|
---
|
|
|
|
{%- from "zabbix/map.jinja" import zabbix with context %}
|
2020-11-04 23:05:21 +01:00
|
|
|
zabbix_config_dir:
|
|
|
|
file.directory:
|
|
|
|
- name: /etc/zabbix
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 755
|
|
|
|
- watch_in:
|
|
|
|
- service: zabbix_agent_service
|
|
|
|
|
2020-10-25 16:35:57 +01:00
|
|
|
zabbix_log_dir:
|
|
|
|
file.directory:
|
|
|
|
- name: /var/log/zabbix
|
|
|
|
- user: zabbix
|
|
|
|
- group: zabbix
|
|
|
|
- mode: 755
|
|
|
|
- watch_in:
|
|
|
|
- service: zabbix_agent_service
|
|
|
|
|
2020-11-04 23:05:21 +01:00
|
|
|
zabbix_agent_config_dir:
|
|
|
|
file.directory:
|
|
|
|
- name: /etc/zabbix/zabbix_agentd.conf.d
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 755
|
|
|
|
- watch_in:
|
|
|
|
- service: zabbix_agent_service
|
|
|
|
|
2020-10-25 16:35:57 +01:00
|
|
|
zabbix_agent_config:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/zabbix/zabbix_agentd.conf
|
|
|
|
- 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 }}
|
|
|
|
- contents: {{ zabbix.agent.psk }}
|
|
|
|
- create: true
|
|
|
|
- watch_in:
|
|
|
|
- service: zabbix_agent_service
|
|
|
|
{% endif %}
|
2020-11-04 23:05:21 +01:00
|
|
|
|
|
|
|
zabbix_userparameters:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/zabbix/zabbix_agentd.conf.d/user_parameters.conf
|
|
|
|
- source: salt://zabbix/templates/user_parameters.j2
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 0755
|
|
|
|
- template: jinja
|
|
|
|
- watch_in:
|
|
|
|
- service: zabbix_agent_service
|