How do we set config file in another place?

Hey,

Have a look to the related documentation page / section.

I don’t know for AWX jobs, but assuming each of your project have its own ansible.cfg file in the directory you’re running your playbook, it should be used over the one you have in /etc/ansible/. You could also use the ANSIBLE_CONFIG envvar to tell Ansible which config file to use for your run.

Also ask yourself why you need to do that in the first place; if it’s because you want to define roles / collections paths for each job, for instance, then you could also use envvars as well.

Edit: Haven’t seen @utoddl already answered your question, as you asked in another thread.

3 Likes