Open prophet60091 opened 5 months ago
Somehow I didn't use any {{ansible_facts['lsb']['release']}}
across all of my Ansible Roles, see https://github.com/search?q=repo%3Aalvistack%2Fansible-role-cri_o%20lsb&type=code
Moreover, our vars/ubuntu-22.04.yml
exists in both develop and master branch:
Most likely you had did some local customization about how to use this Ansible Role, may you share more code about how you setting it up?
So, it's weird to me because I see it in the repo plain as day but I have a requirements.yml with
src: https://github.com/alvistack/ansible-role-cri_o name: alvistack.cri_o scm: git version: 5.4.0
I run ansible-galaxy install -r requirements.yml --force and when I look at the directory in ls ~/.ansible/roles/alvistack.cri_o/vars it didn't have ubuntu-22.04.yml, but I have no explanation for that. But it must have been a fluke or just my bad.. this morning I deleted and re-ran the install and it's definitly there... sorry for the false alarm.
As for the {{ansible_facts['lsb']['release']}} I was just using this in my playbook so that it grabbed the correct vars file for my system. If I don't set that specifically, I get FAILED! => {"msg": "'_apt_key' is undefined"}
Please don't use 5.4.0... It tooooo old...
Please refer https://github.com/alvistack/ansible-role-cri_o/blob/master/ansible-galaxy-requirements.yml about how I set it up with scm + GIT + develop branch.
Yeah I thought so too but: should be something to use in most cases, was my thinking. Thanks for the tip, though!
Not sure if intentional or not but latest release doesn't have a ubuntu-22.04.yml file included, and without a definition in the call it can't find any vars, but even defined it can't because it's not there: ansible.builtin.include_role: name: ansible-role-cri_o vars_from: "{{ansible_facts['distribution'].lower()}}-{{ansible_facts['lsb']['release']}}.yml"