updated zabbix state

This commit is contained in:
Paul 2021-08-16 09:59:37 +02:00
parent a74185cc6a
commit 19cf4d8523
4 changed files with 22 additions and 10 deletions

View File

@ -3,8 +3,8 @@
zabbix_config_dir:
file.directory:
- name: /etc/zabbix
- user: root
- group: root
- user: {{ zabbix.agent.user }}
- group: {{ zabbix.agent.user }}
- mode: 755
- watch_in:
- service: zabbix_agent_service
@ -12,8 +12,8 @@ zabbix_config_dir:
zabbix_log_dir:
file.directory:
- name: /var/log/zabbix
- user: zabbix
- group: zabbix
- user: {{ zabbix.agent.user }}
- group: {{ zabbix.agent.user }}
- mode: 755
- watch_in:
- service: zabbix_agent_service
@ -21,8 +21,8 @@ zabbix_log_dir:
zabbix_agent_config_dir:
file.directory:
- name: /etc/zabbix/zabbix_agentd.conf.d
- user: root
- group: root
- user: {{ zabbix.agent.user }}
- group: {{ zabbix.agent.user }}
- mode: 755
- watch_in:
- service: zabbix_agent_service
@ -30,6 +30,8 @@ zabbix_agent_config_dir:
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:
@ -39,6 +41,8 @@ zabbix_agent_config:
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:
@ -49,8 +53,8 @@ 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
- user: {{ zabbix.agent.user }}
- group: {{ zabbix.agent.user }}
- mode: 0755
- template: jinja
- watch_in:

View File

@ -3,13 +3,15 @@
zabbix_script_dir:
file.directory:
- name: /etc/zabbix/scripts
- user: {{ zabbix.agent.user }}
- group: {{ zabbix.agent.group }}
{%- for key, value in zabbix.agent.scripts.items() %}
zabbix_script_{{ key }}:
file.managed:
- name: /etc/zabbix/scripts/{{ value.name }}
- source: salt://zabbix/scripts/{{ value.name }}
- user: zabbix
- group: zabbix
- user: {{ zabbix.agent.user }}
- group: {{ zabbix.agent.group }}
- mode: 0755
{%- endfor %}

View File

@ -2,6 +2,8 @@
zabbix:
server:
enabled: false
user: zabbix
group: zabbix
pkgs:
- zabbix-frontend-php
- zabbix-server-pgsql
@ -15,6 +17,8 @@ zabbix:
PidFile: /run/zabbix/zabbix_server.pid
agent:
enabled: true
user: zabbix
group: zabbix
pkgs:
- python3-pyzabbix
- zabbix-agent

View File

@ -4,4 +4,6 @@ zabbix_server_config:
file.managed:
- name: /etc/zabbix/zabbix_server.conf
- source: salt://zabbix/templates/zabbix_server.conf.j2
- user: {{ zabbix.server.user }}
- group: {{ zabbix.server.group }}
- template: jinja