Files
ansible/roles/monitoring/tasks/main.yml
2025-10-23 17:58:41 +02:00

30 lines
844 B
YAML

---
- name: Install the correct packages
become: true
block:
- name: Get Zabbix Package
ansible.builtin.get_url:
url: https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.0+debian13_all.deb
dest: /tmp/zabbix_agent.deb
mode: "0644"
- name: Install Zabbix repo
ansible.builtin.apt:
deb: /tmp/zabbix_agent.deb
state: present
- name: Update apt cache and install Zabbix agent v2
ansible.builtin.apt:
update_cache: true
name: zabbix-agent2
state: present
- name: Deploy the zabbix agent custom config
become: true
block:
- name: Deploy the custom config
ansible.builtin.template:
src: tempalates/custom.conf.j2
dest: /etc/zabbix/zabbix_agent2.d/custom.conf
mode: "0755"