When troubleshooting Ansible settings, use ansible-config dump --only-changed
to show only configurations that differ from the default. It reveals the source of the change, whether it's from a config file or an environment variable.
Here's an example 👇
$ ansible-config dump --only-changed
# Output:
# CONFIG_FILE() = /home/rick/ansible-examples/ansible.cfg
# DEFAULT_PRIVATE_KEY_FILE(/home/rick/ansible-examples/ansible.cfg) = /home/rick/.ssh/id_packetcoders
# DEFAULT_STDOUT_CALLBACK(/home/rick/ansible-examples/ansible.cfg) = yaml
# DEPRECATION_WARNINGS(/home/rick/ansible-examples/ansible.cfg) = False
# HOST_KEY_CHECKING(/home/rick/ansible-examples/ansible.cfg) = False