Bug 1897707 - Ansible roles cannot be imported when roles_path is defined under /etc/ansible/ansible.cfg
Summary: Ansible roles cannot be imported when roles_path is defined under /etc/ansibl...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-13 20:38 UTC by Rafael Cavalcanti
Modified: 2020-12-10 12:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31489 0 Normal New Ansible roles cannot be imported when roles_path is defined under /etc/ansible/ansible.cfg 2021-02-08 17:02:55 UTC

Description Rafael Cavalcanti 2020-11-13 20:38:47 UTC
Description of problem:

Ansible roles can not be imported when 'roles_path' is defined in /etc/ansible/ansible.cfg


Version-Release number of selected component (if applicable):
I have tested on 6.7 and 6.8


How reproducible:
100%

Steps to Reproduce:
1. Edit /etc/ansible/ansible.cfg by defining the 'roles_path' variable.
Eg.: roles_path    = /root/git/ansible/roles

2. Try to import ansible roles by going to Satellite webUI -> Configure -> Roles(under Ansible section)
   

Actual results:
we get a message saying "No changes in roles detected on <sat/capsule>"


Expected results:
The Ansible roles should be found under /etc/ansible/roles and listed in the WebUI to be imported.


Additional info:
It seems the /etc/ansible/ansible.cfg takes precedence over /etc/foreman-proxy/ansible.cfg
in '/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_ansible-3.0.1/lib/smart_proxy_ansible/roles_reader.rb'

Comment 1 Ondřej Ezr 2020-12-10 10:54:39 UTC
Created redmine issue https://projects.theforeman.org/issues/31489 from this bug


Note You need to log in before you can comment on or make changes to this bug.