Skip to content

fix(roles/influxdb): enable CRB and EPEL#238

Open
jihan-lf wants to merge 1 commit intomainfrom
fix/epel-repo-file
Open

fix(roles/influxdb): enable CRB and EPEL#238
jihan-lf wants to merge 1 commit intomainfrom
fix/epel-repo-file

Conversation

@jihan-lf
Copy link
Copy Markdown
Contributor

No description provided.

@jihan-lf jihan-lf requested a review from NavidSassan April 29, 2026 10:11
@jihan-lf jihan-lf self-assigned this Apr 29, 2026
@jihan-lf jihan-lf force-pushed the fix/epel-repo-file branch from c47e902 to 267b057 Compare April 30, 2026 07:35
Copy link
Copy Markdown
Member

@markuslf markuslf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate role calls in clamav.yml and duplicity.yml

Both playbooks already invoke repo_baseos and repo_epel at the top of roles:. The patch adds them a second time before python_venv, with different when conditions (== "9" vs | int >= 9, ["7","8","9"] vs | int >= 9). Drop the new block, keep the existing block at the top, and update its conditions in place, the same way you already did in setup_graylog_*.yml, setup_icinga2_master.yml and setup_rocketchat.yml:

- role: 'linuxfabrik.lfops.repo_baseos'
  ...
  when:
    - 'ansible_facts["distribution"] == "Rocky" and ansible_facts["distribution_major_version"] | int >= 9'
    - 'not clamav__skip_repo_baseos | d(false)'

- role: 'linuxfabrik.lfops.repo_epel'
  when:
    - 'ansible_facts["os_family"] == "RedHat" and ansible_facts["distribution_major_version"] in ["7", "8", "9", "10"]'
    - 'not clamav__skip_repo_epel | d(false)'

Same shape for duplicity.yml.

EPEL regression on RHEL 7/8 in the new blocks

In fangfrisch.yml, influxdb.yml, mongodb.yml, python_venv.yml the new condition is distribution_major_version | int >= 9, so EPEL no longer gets enabled on RHEL 7/8 in these playbooks. The setup_*.yml files keep the explicit list ["7", "8", "9", "10"]. Same PR, same intent, different behaviour. Pick one form and apply it everywhere. If the intent is to drop RHEL 7/8 support for these playbooks, reflect that in the affected role READMEs (Mandatory Requirements) and in COMPATIBILITY.md, and call the drop out in the CHANGELOG.

COMPATIBILITY.md: glances row

glances is listed as (x) on RHEL 10. With the new skip the role no longer runs there, so the cell should be empty. The other roles touched by this PR do not change their behaviour (only the playbook wiring around them changes), so the matrix entries for clamav, duplicity, fangfrisch, influxdb, mongodb, python_venv stay as they are.

roles/glances/tasks/main.yml: silent skip violates "fail loudly"

The block-level when: turns the role into a no-op on RHEL 10+. CONTRIBUTING is explicit on this. The README already documents the limitation and accepts a hard fail (No package glances available). Drop the new when: and let the package install fail as before, or replace it with ansible.builtin.assert and a clear message.

roles/glances/README.md: redundant note

The new line Note: This role is not supported on RHEL 10+, as glances is not available in EPEL for that version. repeats what the third bullet under Mandatory Requirements already says in more detail. Drop the new line.

Document the new skip variables in playbooks/README.md

The skip variables you introduce are playbook variables (evaluated in the playbook, not inside a role), so they belong in playbooks/README.md, in the section of the respective playbook. The existing pattern is one bullet per role with the skip var appended, see for example the clamav.yml section:

* [repo_baseos](https://github.com/Linuxfabrik/lfops/tree/main/roles/repo_baseos): `clamav__skip_repo_baseos`
* [repo_epel](https://github.com/Linuxfabrik/lfops/tree/main/roles/repo_epel): `clamav__skip_repo_epel`

You did this for influxdb.yml, please do the same for:

  • duplicity.yml: append `duplicity__skip_repo_epel` to the existing repo_epel bullet (currently bare). duplicity__skip_repo_baseos is already there.
  • fangfrisch.yml: add repo_baseos and repo_epel bullets with `fangfrisch__skip_repo_baseos` and `fangfrisch__skip_repo_epel`.
  • mongodb.yml: add repo_baseos and repo_epel bullets with `mongodb__skip_repo_baseos` and `mongodb__skip_repo_epel`.
  • python_venv.yml: add repo_baseos and repo_epel bullets with `python_venv__skip_repo_baseos` and `python_venv__skip_repo_epel`.

Note: roles/<role>/meta/argument_specs.yml is for role variables only, not for playbook variables, so do not touch it for these. Adding an "Optional Playbook Variables" section to the role README is optional, only roles/glances/README.md does that today.

Indentation of the new comments

  roles:

      # On Rocky 9+ ...
    - role: 'linuxfabrik.lfops.repo_baseos'

Comment is 6 spaces, should be 4 (aligned with the -).

Lost context comment in the setup_*.yml

The previous comment Since the CRB repository is included in Rocky9 default repo file now, this will be done on Rocky9 Systems only. Formerly it came from epel repository. explained the why. Your replacement only states the what. Fold both pieces into one comment, for example:

# CRB lives in the Rocky default repo file (formerly in EPEL); enable it on Rocky 9+
# so python3-virtualenv installs.

Unintended blank-line removal

playbooks/python_venv.yml and playbooks/influxdb.yml lose blank lines (two before roles: / post_tasks:, one before the last role). The other playbooks in this PR keep them. Restore the blanks so the formatting matches the rest of the codebase.

Style consistency inside the same PR

  • Mix of | d(false) and | default(false) in the same files. Project default is | d(false), apply it consistently.
  • New blocks split os_family and distribution_major_version across two when items, the setup_*.yml blocks keep them combined on one line. Pick one form and apply it across all files in this PR.

Commit and PR metadata

Title fix(roles/influxdb): ... and commit scope fix(roles) do not match the actual scope. The change is mostly in playbooks/. Use fix(playbooks), or split per playbook, see CONTRIBUTING.

Pre-existing in fangfrisch.yml:20

The condition references clamav__skip_python_venv, should be fangfrisch__skip_python_venv. Not your bug, but please fix it in the same PR since you are touching the file.

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