Project

General

Profile

Actions

Bug #33162

closed

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

Added by Ondřej Pražák over 3 years ago. Updated over 3 years 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.

Actions #1

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
Actions #2

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
Actions #3

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases 3.0.0 added
Actions #4

Updated by Ondřej Pražák over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

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
Actions #6

Updated by The Foreman Bot over 3 years ago

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

Updated by Ewoud Kohl van Wijngaarden over 3 years ago

  • Fixed in Releases 2.5.3 added
Actions

Also available in: Atom PDF