community.zabbix
community.zabbix copied to clipboard
zabbix repository listed twice when a previous installation from package exists
SUMMARY
During the Zabbix Agent installation on RedHat/Centos, the official package "zabbix-release-{{zabbix_agent_version}}-1.el{{distribution_version_...}}.noarch.rpm" is not used, instead two files are created.
These files conflict with an existing installation from package, because zabbix-non-supported is listed twice:
- zabbix.repo - lists both repos when created by rpm, and only one when created from role
- zabbix-non-supported.repo, created by role
Use of the package could be a better option (personally i'd prefer this). Or specify "file" in "yum_repository" module, also.
Example log:
# yum search zabbix-agent
Loaded plugins: fastestmirror
Repository zabbix-non-supported is listed more than once in the configuration
...
ISSUE TYPE
- Feature Idea
COMPONENT NAME
https://github.com/ansible-collections/community.zabbix/blob/81677601cd93da7c3d849f07347bf0d6d243a0c1/roles/zabbix-agent/tasks/RedHat.yml#L48
Also, files are expected to contain proxy credentials, but mode
parameter is not set, leaving them readably by all.
-rw-r--r-- 1 root root 227 Jul 2 12:09 zabbix-non-supported.repo
-rw-r--r-- 1 root root 196 Jul 2 12:09 zabbix.repo