Bug #33162
closedRoles imported from a collection installed to /etc/ansible/collections are not found when run on hosts
Description
Description of problem:
If an Ansible collection is installed on Foreman to /etc/ansible/collections, the roles from the collection are imported to Foreman, and roles from that collection are then assigned to a host, Foreman is unable to find those roles when Ansible roles are run on the host.
Steps to Reproduce:
1. Install an Ansible Collection to /etc/ansible/collections:
# ansible-galaxy collection install ericsysmin.system -p /etc/ansible/collections/
2. Import the roles from the collection on the Configure > Roles page of the Foreman webUI.
3. Register a host to Foreman and configure it for remote execution.
4. Assign one or more roles from the collection to the host.
5. Select the "Run Ansible roles" option from the Hosts > All Hosts > [hostname] page of the Foreman webUI.
Actual results:
The task appears to complete successfully, but the roles from the collection are not actually run. The following error appears in the console entry for the task:
ERROR! the role 'ericsysmin.system.chrony' was not found in /tmp/d20210716-9401-1q84fq9/project/roles:/etc/ansible/roles:/usr/share/ansible/roles:/tmp/d20210716-9401-1q84fq9/project
Expected results:
Roles in an Ansible Collection installed to /etc/ansible/collections run successfully on hosts.
Additional info:
If the same collection is installed to /usr/share/ansible/collections and the roles from the collection are imported to Foreman, those roles run successfully after being assigned to a host.
Updated by Ondřej Pražák over 3 years ago
- Project changed from Ansible to Installer
- Subject changed from Roles imported from a collection installed to /etc/ansible/collections are not found when run on hosts to Roles imported from a collection installed to /etc/ansible/collections are not found when run on hosts
Updated by The Foreman Bot over 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ondřej Pražák
- Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/693 added
Updated by Ondřej Pražák over 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset puppet-foreman_proxy|012d533ce0112f0ab974affb795998031f34763d.
Updated by Ewoud Kohl van Wijngaarden over 3 years ago
- Category set to Foreman modules
- Target version set to 2.5.3
- Triaged changed from No to Yes
Updated by The Foreman Bot over 3 years ago
- Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/699 added
Updated by Ewoud Kohl van Wijngaarden over 3 years ago
- Fixed in Releases 2.5.3 added