install zabbix agent in the baseline

This commit is contained in:
Peter 2025-07-14 18:32:39 +02:00
parent c7a3cb40e9
commit 1df77aa74d
7 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,41 @@
- name: Install zabbix related packages
ansible.builtin.apt:
pkg:
- zabbix-agent2
# To monitor our physical disks health, not needed for vm's.
- smartmontools
- name: Zabbix firewall
ansible.builtin.template:
dest: /etc/firewall.d/zabbix
group: root
owner: root
mode: "0755"
src: zabbix-firewall.j2
notify: Restart firewall
- name: Write psk file
ansible.builtin.copy:
content: "{{ zabbix_psk }}\n"
dest: /etc/zabbix/zabbix.psk
group: root
owner: root
mode: "0644"
notify: Restart zabbix-agent2
- name: Zabbix agent config file
ansible.builtin.template:
dest: /etc/zabbix/zabbix_agent2.d/ansible.conf
group: root
owner: root
mode: "0644"
src: zabbix-agent.j2
notify: Restart zabbix-agent2
- name: Zabbix sudoers file
ansible.builtin.copy:
dest: /etc/sudoers.d/zabbix
group: root
owner: root
mode: "0644"
src: zabbix-sudoers