I define a custom ansible.cfg, and export it as below in the
export ANSIBLE_CONFIG="../aws_ansible.cfg"
when I run it, this is picked up but when I pass the inventory as an arg, it fails to recognize the arg or take precedence although there is no inventory specified in the aws_ansible.cfg
.
export ANSIBLE_CONFIG=../aws_ansible.cfg
ansible-playbook demo.yml -i ./inventories/dev1 --verbose
Using /projects/demo/aws_ansible.cfg as config file
If I specify the inventory within aws_ansible.cfg
it would work, but I would like to pass it as an argument.
Please advice if also extra-vars
would take precedence over what are specified in aws_ansible.cfg