Skip to content
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

Put zabbix_repo_deb_url in defaults #1225

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

eb4x
Copy link
Collaborator

@eb4x eb4x commented May 9, 2024

SUMMARY

Instead of having a partial url in vars/Debian.yml, and appending to it with additional info via set_fact, if zabbix_repo_deb_url is not defined. Just supply it as a default, which could be overriden by user.

Zabbix also supplies an ubuntu-arm64 repo, so now we check for that aswell.

Notes on Raspbian
There are very few ways do differentiate Raspbian from Debian with ansible_facts. The only candidate seems to be ansible_facts.lsb.id.

The lsb section does not get filled in unless some packages are installed. But luckily those packages come installed on Raspbian systems. And we just default it back to ansible_facts.distribution if lsb.id is not present. So we're gonna simplify and drop some tasks.

Tested with ansible-core 2.13.13 on;

2024-03-12-raspios-bullseye-armhf-lite
2024-03-15-raspios-bookworm-armhf-lite

If this for some unforseen reason wouldn't work on older or newer versions of raspbian, there's always the option of just overriding the zabbix_repo_deb_url.

ISSUE TYPE
  • Refactor pull request
  • Feature Pull Request
COMPONENT NAME

All the roles.

ADDITIONAL INFORMATION

Discussed at great length in #1196 (comment)

Addresses the concerns of #1219

Instead of having a partial url in vars/Debian.yml, and appending
to it with additional info via set_fact, if zabbix_repo_deb_url is
not defined. Just supply it as a default, which could be overriden
by user.

Zabbix also supplies an ubuntu-arm64 repo, so now we check for that
aswell.

Notes on Raspbian
There are very few ways do differentiate Raspbian from Debian with
ansible_facts. The only candidate seems to be ansible_facts.lsb.id.

The lsb section does not get filled in unless some packages are
installed. But luckily those packages come installed on Raspbian
systems. And we just default it back to ansible_facts.distribution
if lsb.id is not present. So we're gonna simplify and drop some
tasks.

Tested with ansible-core 2.13.13 on;

  2024-03-12-raspios-bullseye-armhf-lite
  2024-03-15-raspios-bookworm-armhf-lite

If this for some unforseen reason wouldn't work on older or newer
versions of raspbian, there's always the option of just overriding
the zabbix_repo_deb_url.
@pyrodie18 pyrodie18 merged commit 55e58d1 into ansible-collections:main May 9, 2024
280 checks passed
pyrodie18 pushed a commit to pyrodie18/community.zabbix that referenced this pull request May 14, 2024
Instead of having a partial url in vars/Debian.yml, and appending
to it with additional info via set_fact, if zabbix_repo_deb_url is
not defined. Just supply it as a default, which could be overriden
by user.

Zabbix also supplies an ubuntu-arm64 repo, so now we check for that
aswell.

Notes on Raspbian
There are very few ways do differentiate Raspbian from Debian with
ansible_facts. The only candidate seems to be ansible_facts.lsb.id.

The lsb section does not get filled in unless some packages are
installed. But luckily those packages come installed on Raspbian
systems. And we just default it back to ansible_facts.distribution
if lsb.id is not present. So we're gonna simplify and drop some
tasks.

Tested with ansible-core 2.13.13 on;

  2024-03-12-raspios-bullseye-armhf-lite
  2024-03-15-raspios-bookworm-armhf-lite

If this for some unforseen reason wouldn't work on older or newer
versions of raspbian, there's always the option of just overriding
the zabbix_repo_deb_url.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants