Add support for Rocky Linux#197
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? |
|
|
||
| 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.
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.
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.
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.
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.
I've got a middle ground I'm trying.
There was a problem hiding this comment.
@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_curlwhich 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