-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add support for Rocky Linux #197
base: master
Are you sure you want to change the base?
Conversation
This enables installation of Nomad on Rocky machines. It also lets you define a variable `minimal_curl` which will force installation of curl-minimal, as sometimes molecule images have one thing and production installations have another.
I hope CI can run these tests, because I couldn't get molecule running locally. Something about it wanting a sudo password. |
@beechesII Sorry to ping, but going by recent merges I think you're active on this project - is there something I can do to get this in? |
vars/RedHat.yml
Outdated
@@ -2,7 +2,7 @@ | |||
# File: vars/RedHat.yml - Red Hat OS variables for Nomad | |||
|
|||
nomad_os_packages: | |||
- "{% if (ansible_distribution == 'AlmaLinux' and ansible_distribution_version is version('9', '>=')) %}curl-minimal{% else %}curl{% endif %}" | |||
- "{% if (ansible_distribution == 'AlmaLinux' and ansible_distribution_version is version('9', '>=')) or (minimal_curl is defined) %}curl-minimal{% else %}curl{% endif %}" |
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.
We should not use two different ways to tackle this problem. Either use the variable minimal_curl
or rely on the distribution facts. Both seem okay, but I'd probably use the distribution-vars since then we have no additional variable.
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.
That'd be great, but the problem is some AlmaLinux or Rocky setups use curl, while some use curl-minimal. The distribution setup isn't consistent.
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.
We could solve this by changing the task `Include OS variables" to something like this:
- name: Fetch OS dependent variables
ansible.builtin.include_vars:
file: "{{ item }}"
with_first_found:
- files:
- "{{ ansible_facts.distribution }}_{{ ansible_facts.distribution_major_version }}.yml"
- "{{ ansible_facts.distribution }}.yml"
- "{{ ansible_facts.os_family }}_{{ ansible_facts.distribution_major_version }}.yml"
- "{{ ansible_facts.os_family }}.yml"
skip: true
tags: always
Then we could seperate different os-versions. I guess even without any breaking changes. Do you want to take a stab at this?
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.
That wouldn't help - sorry I wasn't clear. One install of Rocky 9 might require curl-minimal, and another might require curl.
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.
I've got a middle ground I'm trying.
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.
@rndmh3ro Maybe something like this? Where the default is in defaults, and we leave it for Alma 9 for backwards compatibility, but otherwise you can just override it.
This sets an overridable default of 'curl', but for backwards compatibility makes it curl-minimal for AlmaLinux 9.
28b4506
to
8ca1ff2
Compare
This enables installation of Nomad on Rocky machines. It also lets you define a variable
minimal_curl
which will force installation of curl-minimal, as sometimes molecule images have one thing and production installations have another.These are an upstream push of some changes we had to do in order to get Nomad running on our Rocky boxes for podman support: https://github.com/pulibrary/princeton_ansible/pull/5098/files