--- - name: Configure Zabbix repo yum_repository: name: zabbix description: Zabbix Repository baseurl: https://repo.zabbix.com/zabbix/{{ zabbix_major_version }}{% if zabbix_major_version is version('7.2', '>=') %}/stable{% endif %}/rhel/$releasever/$basearch/ gpgcheck: True gpgkey: "{{ zabbix_repo_key }}" priority: 50 includepkgs: - zabbix* tags: repo,zabbix - name: Configure Zabbix repo yum_repository: name: zabbix-release description: Zabbix Release Repository baseurl: https://repo.zabbix.com/zabbix/{{ zabbix_major_version }}/release/rhel/$releasever/noarch/ gpgcheck: True gpgkey: "{{ zabbix_repo_key }}" priority: 50 includepkgs: - zabbix* state: "{{ zabbix_major_version is version('7.2', '>=') | ternary('present', 'absent') }}" tags: repo,zabbix - name: Configure Zabbix Agent2 plugins repo yum_repository: name: zabbix-agent2-plugins state: absent description: Zabbix Agent2 plugins Repository baseurl: https://repo.zabbix.com/zabbix-agent2-plugins/1/rhel/$releasever/$basearch/ gpgcheck: True priority: 50 includepkgs: - zabbix* tags: repo,zabbix