Ansible/Configuration: Difference between revisions
From charlesreid1
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This article covers configuration of [[Ansible]] using the Ansible configuration file, <code>ansible.cfg</code>. | |||
Note: any configuration option that can be set in ansible.cfg can also be set/overridden with an environment variable. | |||
=Overview= | |||
The configuration file, like the hosts file, consists of headings in <code><nowiki>[brackets]</nowiki></code> followed by <code>key = value</code> values, one per line. | |||
Example: | |||
<pre> | |||
[defaults] | |||
inventory = inventory | |||
remote_user = vagrant | |||
private_key_file = ~/.vagrant.d/insecure_private_key | |||
host_key_checking = False | |||
</pre> | |||
=References= | |||
There is a comprehensive reference listing all possible options that can be set in this file here: https://docs.ansible.com/ansible/latest/reference_appendices/config.html | There is a comprehensive reference listing all possible options that can be set in this file here: https://docs.ansible.com/ansible/latest/reference_appendices/config.html | ||
| Line 6: | Line 24: | ||
=Flags= | |||
{{AnsibleFlag}} | {{AnsibleFlag}} | ||
Revision as of 22:33, 11 November 2018
This article covers configuration of Ansible using the Ansible configuration file, ansible.cfg.
Note: any configuration option that can be set in ansible.cfg can also be set/overridden with an environment variable.
Overview
The configuration file, like the hosts file, consists of headings in [brackets] followed by key = value values, one per line.
Example:
[defaults] inventory = inventory remote_user = vagrant private_key_file = ~/.vagrant.d/insecure_private_key host_key_checking = False
References
There is a comprehensive reference listing all possible options that can be set in this file here: https://docs.ansible.com/ansible/latest/reference_appendices/config.html
Each configuration option can also be set with an environment variable.
Flags