Project

General

Profile

Bug #33162

Roles imported from a collection installed to /etc/ansible/collections are not found when run on hosts

Added by Ondřej Pražák about 2 months ago. Updated 29 days ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:

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.

Associated revisions

Revision 012d533c (diff)
Added by Ondřej Pražák about 2 months ago

Fixes #33162 - Set value for Ansible collections_paths

History

#1 Updated by Ondřej Pražák about 2 months ago

  • 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
  • Project changed from Ansible to Installer

#2 Updated by The Foreman Bot about 2 months ago

  • Assignee set to Ondřej Pražák
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/693 added

#3 Updated by The Foreman Bot about 2 months ago

  • Fixed in Releases 3.0.0 added

#4 Updated by Ondřej Pražák about 2 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Ewoud Kohl van Wijngaarden about 2 months ago

  • Triaged changed from No to Yes
  • Target version set to 2.5.3
  • Category set to Foreman modules

#6 Updated by The Foreman Bot 29 days ago

  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/699 added

#7 Updated by Ewoud Kohl van Wijngaarden 29 days ago

  • Fixed in Releases 2.5.3 added

Also available in: Atom PDF