Open simonLeary42 opened 2 years ago
$ cat roles/ood-ansible-2.0.6/tasks/main.yml
- name: include distribution variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}/{{ ansible_distribution_major_version}}.yml"
- "{{ ansible_distribution }}.yml"
tags: [ 'always' ]
...
in roles/ood-ansible-2.0.6/tasks/main.yml:
- name: "Ansible | Print a variable"
debug:
msg: "ansible_distribution: {{ ansible_distribution }}"
- name: "Ansible | Print a variable"
debug:
msg: "path1: {{ ansible_distribution }}/{{ ansible_distribution_major_version}}.yml"
- name: "Ansible | Print a variable"
debug:
msg: "path2: {{ ansible_distribution }}.yml"
output:
TASK [ood-ansible-2.0.6 : Ansible | Print a variable] **************************************************************************************
ok: [ood] => {
"msg": "path1: Ubuntu/22.yml"
}
TASK [ood-ansible-2.0.6 : Ansible | Print a variable] **************************************************************************************
ok: [ood] => {
"msg": "path2: Ubuntu.yml"
}
~/ansible/roles/ood-ansible-2.0.6$ find . | grep Ubuntu ./vars/Ubuntu ./vars/Ubuntu/20.yml ./vars/Ubuntu/18.yml
so we only support ubuntu 18 and 20, but 20 doesn't work in my other ticket because we need the python3-dnf package
Surely there's a more graceful way for ansible to fail when it can't find vars for a given distribution.
Is there a supported operating system list somewhere that I should have been referencing?
Surely there's a more graceful way for ansible to fail when it can't find vars for a given distribution. https://github.com/OSC/ood-ansible/pull/152
Is there a supported operating system list somewhere that I should have been referencing? https://github.com/OSC/ood-ansible/pull/153
my host is a proxmox ubuntu jammy LXC. The only edit I made to this role was enabling build from source.
$ cat hosts:
$ cat custom_ood.yml
$ ansible-playbook custom_ood.yml