ansible-zookeeper icon indicating copy to clipboard operation
ansible-zookeeper copied to clipboard

Role installation failing on Ubuntu Ansible Controller v. 2.9.6

Open bfedo opened this issue 1 year ago • 1 comments

Hello,

First of all, I would like to thank you for sharing this role with the community. I am using Ansible 2.9.6. on a Ubuntu 20.04.4 (ansible controller) and I am getting the following error when trying to execute the role installation:

TASK [sleighzy.zookeeper : Load OS-specific variables] ************************************************************************************************************************************** task path: /home/xxx/.ansible/roles/sleighzy.zookeeper/tasks/main.yaml:7 [WARNING]: Invalid request to find a file that matches a "null" value failed: [xxx] (item=/home/localadmin/.ansible/roles/sleighzy.zookeeper/vars/../vars/Debian.yml) => { "ansible_facts": {}, "ansible_included_var_files": [], "ansible_loop_var": "item", "changed": false, "item": "/home/localadmin/.ansible/roles/sleighzy.zookeeper/vars/../vars/Debian.yml", "message": "Could not find file on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option" }

PLAY RECAP ********************************************************************************************************************************************************************************** xxx : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

The target machine is running under the same OS.

The issue seems to be related to the ansible.builtin.include_vars module and if I am changing it with include_vars the installation of the role will work correctly.

################ Ansible version:

localadmin@xxx:~/Ansible$ ansible --version ansible 2.9.6 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/localadmin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible executable location = /usr/bin/ansible python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]

################ OS version:

localadmin@xxx:~/Ansible$ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.4 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal

From what I could see, I am already using the latest version of Ansible available for Ubuntu. Is this something that can be fixed?

bfedo avatar Sep 14 '22 13:09 bfedo

Thanks for that @bfedo . Hmmm, interesting, not something I've come across before. I won't have a chance to investigate right this moment unfortunately. I've had brief internet search but didn't see any immediate issues with the usage of ansible.builtin.include_vars. Presumably you're not blocked right now given you're able to change this to include_vars and it works as expected.

sleighzy avatar Sep 19 '22 01:09 sleighzy