-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Zabbix repository gpg key URL customizable #1186
Make Zabbix repository gpg key URL customizable #1186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have left this earlier but please update the readme for the roles with the new variables and then you're good to go.
After updating the readme I noticed that the other deb repository vars all start with zabbix_repo_deb. I adopted the same prefix for my variables. |
Co-authored-by: Evgeny <[email protected]>
Co-authored-by: Evgeny <[email protected]>
@pyrodie18 you merged without waiting for test to complete -))) |
It had completed the first time and there were no code significant changes so ya but sorry |
No worries -) |
SUMMARY
The proposed change introduces a variable in the agent, javagateway, proxy, server, and web role, which replaces the hardcoded string in the "Debian | Download gpg key" task. The default value of the "zabbix_repo_deb_gpg_key_url" variable is the previously hardcoded string: http://repo.zabbix.com/zabbix-official-repo.key
Additionally, a second variable "zabbix_repo_deb_include_deb_src" with default value "true" was introduced to toggle adding deb-src in the "Debian | Installing repository {{ ansible_distribution }}" task.
Rationale: We are deploying Zabbix via Ansible in an environment without Internet access. We are using our own package mirror, which is configurable via the "zabbix_repo_deb_url". Unfortunately, without the proposed changes, we are unable to change the download location of the gpg key from the official repo to our own mirror. The second change, making deb-src optional is another change that makes the role easier to use with a custom package mirror. In our testing, it turned out that the deb-src repo was not required. Overall, both changes should not change the current functionality given that only hardcoded parts were replaced by variables with default values.
ISSUE TYPE
COMPONENT NAME
roles: zabbix_agent, zabbix_javagateway, zabbix_proxy, zabbix_server, and zabbix_web
ADDITIONAL INFORMATION
I was unsure if I set the variables at the right location (currently defaults/main.yml) of each role. One could also argue to put them in vars/Debian.yml of each role. In the current repo, the defaults already contained some os dependent vars, for example, the # Yum/APT Variables section, therefore I added them there. I am always open to moving or renaming them. For now, I stuck with the naming scheme that prefixes the role name, but it could be confusing since, for example, "zabbix_repo_deb_url" does not stick to this naming scheme and is kind of related.