Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded Ansible - Add support for ansible.cfg files in user repositories #447

Open
dmetzger57 opened this issue Jul 17, 2020 · 1 comment

Comments

@dmetzger57
Copy link

Original BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1737149

Description of problem:
If a user adds a git repository to be used with embedded ansible and it contains an ansible.cfg file we should use that file when running playbooks.

Version-Release number of selected component (if applicable): 5.11.0.17

Steps to Reproduce:

  1. Add a repo with an ansible.cfg file that overrides some settings (like roles_path)
  2. Run a playbook

Actual results:
Config settings from the repo file are not used.

Expected results:
Repo file config is used.

Additional info:
This is a core ansible feature. The priority for finding config files to use when running a playbook is described here https://docs.ansible.com/ansible/latest/reference_appendices/config.html#the-configuration-file

As a solution for this, we could ensure that our working directory is the one where the ansible.cfg exists when trying to run a playbook.

A word of warning for this though, we install the plugin-provided roles to a custom directory then set roles_path in /root/.ansible.cfg on the appliance.

If we put a user's ansible.cfg in front of ours in that priority list then those roles will be inaccessible for that playbook run. This behavior might be worth documenting.

This issue was originally raised in a comment here ManageIQ/manageiq#19079 (comment)

@gtanzillo
Copy link
Member

/cc @NickLaMuro, just so you're aware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants