Ansible - Configuration File
Updated at 2017-03-21 23:46
Ansible will try to find a configuration file from:
ANSIBLE_CONFIG
environment variableansible.cfg
(in the current directory).ansible.cfg
(in the home directory)/etc/ansible/ansible.cfg
Example ansible.cfg
with a comment:
[defaults]
inventory = ./inventory.py ; This points to the file that lists your hosts
host_key_checking = False
And now you don't have to specify the inventory file -i
.
ansible all -m ping
More details in Ansible config documentation.