+

Search Tips   |   Advanced Search

Configuring Ansible

Topics


Configuration file

Ansible configuration file is ansible.cfg.

The stock configuration should be sufficient for most users. Paths to where file is searched are listed in reference documentation.


Getting the latest configuration

If installing Ansible from a package manager, the latest ansible.cfg file should be present in /etc/ansible, possibly as a .rpmnew file (or other) as appropriate in the case of updates.

If you installed Ansible from pip or from source, you may want to create this file in order to override default settings in Ansible. An example file is available on GitHub.

For all configuration options, see configuration_settings or use the ansible-config command line utility.


Environmental configuration

Ansible also allows configuration of settings using environment variables. If these environment variables are set, they will override any setting loaded from the configuration file.

You can get a full listing of available environment variables from Ansible Configuration Settings.


Command line options

Not all configuration options are present in the command line, just the ones deemed most useful or common. Settings in the command line will override those passed through the configuration file and the environment.

The full list of options available is in ansible-playbook and ansible.

Next Previous