Files
ansible-roles/roles/repo_zabbix/tasks/Debian.yml
2025-08-18 10:00:17 +02:00

25 lines
1.1 KiB
YAML

---
- name: Remove Zabbix Agent2 plugins repo
apt_repository:
# Zabbix plugin repo doesn't have bookworm yet, so use bullseye for now in this case
repo: deb http://repo.zabbix.com/zabbix-agent2-plugins/1/{{ ansible_distribution | lower }} {{ (ansible_distribution_major_version is version('12', '>=')) | ternary('bullseye', ansible_distribution_release) }} main
filename: zabbix
state: absent
tags: repo,zabbix
- name: Add Zabbix repo key
get_url:
url: https://repo.zabbix.com/zabbix-official-repo-apr2024.gpg
dest: /etc/apt/keyrings/zabbix.gpg
environment:
https_proxy: "{{ system_proxy | default('') }}"
tags: repo,zabbix
- name: Add Zabbix repo
apt_repository:
repo: deb [signed-by=/etc/apt/keyrings/zabbix.gpg] https://repo.zabbix.com/zabbix/{{ zabbix_major_version }}{% if zabbix_major_version is version('7.2', '>=') %}/stable{% endif %}/{{ ansible_distribution | lower }} {{ (ansible_distribution_major_version is version('13', '>=')) | ternary('bookworm', ansible_distribution_release) }} main
filename: zabbix
tags: repo,zabbix