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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions vars/Rocky_8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: MIT
---
# Put internal variables here with Rocky Linux 8 specific values.

__nbde_client_packages:
- clevis
- clevis-dracut
- clevis-luks
- clevis-systemd
- 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?

dracut -fv --regenerate-all

__nbde_client_dracut_settings:
- kernel_cmdline+=" rd.neednet=1 "
- omit_dracutmodules+=" ifcfg "

__nbde_client_clear_initrd_netcfg_strategy: networkmanager_config

# vim:set ts=2 sw=2 et:
22 changes: 22 additions & 0 deletions vars/Rocky_9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: MIT
---
# Put internal variables here with Rocky Linux 9 specific values.

__nbde_client_packages:
- clevis
- clevis-dracut
- clevis-luks
- clevis-systemd
- 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

dracut -fv --regenerate-all

__nbde_client_dracut_settings:
- kernel_cmdline+=" rd.neednet=1 "
- omit_dracutmodules+=" ifcfg "

__nbde_client_clear_initrd_netcfg_strategy: networkmanager_config

# vim:set ts=2 sw=2 et:
Loading