Bug #31489
closedAnsible roles cannot be imported when roles_path is defined under /etc/ansible/ansible.cfg
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1897707
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'