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

chore: add Rocky Linux vars files #175

Closed
wants to merge 1 commit into from

Conversation

xeluior
Copy link
Contributor

@xeluior xeluior commented Aug 20, 2024

Enhancement: Adds support for Rocky Linux 8/9

Reason: I use Rocky Linux in my environment

Result: Vars files added for Rocky Linux 8/9

Issue Tracker Tickets (Jira or BZ if any): N/A

@spetrosi spetrosi changed the title add Rocky Linux vars files chore: add Rocky Linux vars files Aug 21, 2024
- iproute
- NetworkManager

__nbde_client_initramfs_update_cmd: >
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use >? You can type __nbde_client_initramfs_update_cmd: dracut -fv --regenerate-all

Copy link
Contributor Author

@xeluior xeluior Aug 21, 2024

Choose a reason for hiding this comment

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

I literally just copied the RedHat_8.yml file, renamed it and reworded the comment at the top so that the vars would get pulled in when running against a Rocky Linux system. The Alma and CentOS vars files are also identical (outside the comment) to the RedHat ones, so it may even make sense to add a check in set_vars.yml for {{ ansible_facts['os_family'] }}_{{ ansible_facts['distribution_major_version'] }}.yml and do away with the seperate files for each EL flavor. Not sure which would be prefered.

Copy link
Contributor

Choose a reason for hiding this comment

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

{{ ansible_facts['os_family'] }}_{{ ansible_facts['distribution_major_version'] }}.yml

There are several problems with using os_family like this

  • How to distinguish between RedHat the distribution vs. RedHat the os_family?
  • Fedora is part of the RedHat os_family but has a very different versioning scheme
  • There may be other members of RedHat family that do not follow the versioning scheme followed by RedHat, CentOS, Rocky, Alma, and Oracle

It would be great if there were an Ansible category somewhere between os_family and distribution - os_clone_alikes? - that were version sync compatible - that way you could say RedHatClones_8 and be very sure that you mean RedHat and very close version clones, and not things like Fedora, ScientificLinux, etc. which are part of RedHat family.

Of course, in practice, these roles will almost never be used on anything except Fedora and strict clones of RedHat.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good points, I wasn't aware some of those other OSes still fell under the RedHat os family. Back to the original comment then, would it be better to move those to the single line as you suggested, or keep as is for consistency with the other RedHat-derived vars files?

- iproute
- NetworkManager

__nbde_client_initramfs_update_cmd: >
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@richm
Copy link
Contributor

richm commented Oct 15, 2024

@xeluior I think symlinks would be best - that is - the Rocky_N.yml files should just be symlinks to the corresponding RedHat_N.yml file. We have other roles using symlinks like this - https://github.com/linux-system-roles/ssh/tree/main/vars - which uses CentOS_N.yml as a symlink to the corresponding RedHat_N.yml - wdyt?

@richm
Copy link
Contributor

richm commented Oct 16, 2024

@xeluior I have what I think is a more elegant solution, for all system roles - linux-system-roles/.github#74

@richm
Copy link
Contributor

richm commented Oct 16, 2024

@xeluior I have what I think is a more elegant solution, for all system roles - linux-system-roles/.github#74

and it looks like nbde_client is one of the "lucky" roles, that does not have tasks or vars based on conditionals such as ansible_distribution in ['CentOS', 'RedHat'] - this is a problem with Rocky/Alma support in several roles.

@xeluior
Copy link
Contributor Author

xeluior commented Oct 30, 2024

@xeluior I have what I think is a more elegant solution, for all system roles - linux-system-roles/.github#74

Not sure I fully understand the linked PR, but if it adds Rocky support without needing these vars files we can probably close this PR.

@richm
Copy link
Contributor

richm commented Oct 30, 2024

@xeluior I have what I think is a more elegant solution, for all system roles - linux-system-roles/.github#74

Not sure I fully understand the linked PR, but if it adds Rocky support without needing these vars files we can probably close this PR.

ok - the role now has support for Rocky due to #181 - please try this.

@richm richm closed this Oct 30, 2024
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.

3 participants