Hello!
In the RH294 chapter 7 section 5 under the "Installing Roles Using a Requirements File" title, there is an example of using a tar archive from "file:///opt/local/roles/tarrole.tar".
I didn't get this working with Ansible Controller. I placed the file on the execution node and updated the project to install the requirements, but it failed with a file not found error. I suspect this is due to the update process running in a container that can't access the files on the host machine.
Do you think it is not possible to use this approach (collections in local tar archives) with Ansible Controller? Thanks!
Hello
Have you checked the ansible-navigator config to see if the collection path is correct?
My ansible-navigator config has the following setup for the directory my-project:
Collections paths False /home/student/my-project/ansible.cfg
with the following paths:
- /home/student/my-project
- /home/runner/.ansible/collections
- /usr/share/ansible/collections
Perhaps your ansible-navigator configuration is missing a line to point to your project directory?
I created a couple of roles with ansible-galaxy, tarred them up and then installed them to the roles subdir in the my-project dir and a simple playbook was able to run them.
Are you getting the error when installing the role from tar files or are you not seeing the roles in ansible-navigator once they are installed?
Note: I ran these on the Red Hat Learning Subscription platform usisng the labs for RH294.
Hope this helps.
Hello and thanks for the reply!
What I mean by the "Ansible Controller" is the Ansible Automation Controller used in the DO374 course. So this issue is more related to the DO374's chapter 9 section 7, but unfortunately that section is focused on using collections from (private) automation hubs and not from git or tarballs.
I might add that if I point the requirement source to a git repository (instead of a file), the download succeeds. The error happens when I press the Refresh button of the Project tab.
Hello
Apologies, I thought you were referring to the ansible-navigator environment on the control node; as part of the RH294 course!
I have no knowledge of the D0374 course and the "Ansible Controller" used there.
Sorry for the confusion.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.