2017-09-23 05:19:50 +02:00
|
|
|
Configuration
|
|
|
|
-------------
|
2013-09-29 21:51:26 +02:00
|
|
|
|
2013-12-26 20:32:01 +01:00
|
|
|
.. contents:: Topics
|
|
|
|
|
2013-09-29 21:51:26 +02:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
There are several ways to control Ansible settings, this is a brief descriptoin of them.
|
2014-02-14 21:34:58 +01:00
|
|
|
|
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
.. _the_configuration_file:
|
2013-09-29 21:51:26 +02:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
Configuration file
|
|
|
|
++++++++++++++++++
|
2016-09-16 21:44:22 +02:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
Certain settings in Ansible are adjustable via a configuration file (ansible.cfg).
|
|
|
|
The stock configuration should be sufficient for most users, but there may be reasons you would want to change them.
|
2016-09-16 21:44:22 +02:00
|
|
|
|
2013-10-05 00:14:54 +02:00
|
|
|
.. _getting_the_latest_configuration:
|
|
|
|
|
2013-09-29 21:51:26 +02:00
|
|
|
Getting the latest configuration
|
|
|
|
````````````````````````````````
|
|
|
|
|
|
|
|
If installing ansible from a package manager, the latest ansible.cfg should be present in /etc/ansible, possibly
|
|
|
|
as a ".rpmnew" file (or other) as appropriate in the case of updates.
|
|
|
|
|
|
|
|
If you have installed from pip or from source, however, you may want to create this file in order to override
|
|
|
|
default settings in Ansible.
|
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
An example file is availble `ansible.cfg in source control <https://raw.github.com/ansible/ansible/devel/examples/ansible.cfg>`_
|
2013-10-08 14:26:40 +02:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
For more details and a full listing of available configurations go to :doc:configuration or (starting at Ansible 2.4)
|
|
|
|
you can use the :doc:`ansible-config` command line utility to list your available options and inspect the current values.
|
2013-09-29 21:51:26 +02:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
For in depth details you check out :doc:`config`.
|
2013-10-05 00:14:54 +02:00
|
|
|
|
2013-09-29 21:51:26 +02:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
Environmental configuration
|
|
|
|
+++++++++++++++++++++++++++
|
2017-01-05 22:38:36 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
Ansible also allows configuration of settings via environment variables.
|
|
|
|
If these environment variables are set, they will override any setting loaded from the configuration file.
|
2017-01-05 22:38:36 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
You can get a full listing of available variables from :doc:`config`.
|
2017-01-05 22:38:36 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
.. _command_line_configuration:
|
2015-12-10 05:25:23 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
Command line options
|
|
|
|
++++++++++++++++++++
|
2015-12-10 05:25:23 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
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.
|
2015-12-10 05:25:23 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
The full list of options available is in :doc:`ansible-playbook` and :doc:`ansible`.
|
2015-12-10 05:25:23 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
.. seealso::
|
2015-12-10 05:25:23 +01:00
|
|
|
|
2017-09-23 05:19:50 +02:00
|
|
|
:doc:`intro_dynamic_inventory`
|
|
|
|
Pulling inventory from dynamic sources, such as cloud providers
|
|
|
|
:doc:`intro_adhoc`
|
|
|
|
Examples of basic commands
|
|
|
|
:doc:`playbooks`
|
|
|
|
Learning Ansible's configuration, deployment, and orchestration language.
|
|
|
|
:doc:`config`
|
|
|
|
Ansible's configuration file and environment settings in detail
|
|
|
|
:doc:`command_line_tools`
|
|
|
|
Ansible's command line tools documentation and detailed options
|
|
|
|
`Mailing List <http://groups.google.com/group/ansible-project>`_
|
|
|
|
Questions? Help? Ideas? Stop by the list on Google Groups
|
|
|
|
`irc.freenode.net <http://irc.freenode.net>`_
|
|
|
|
#ansible IRC chat channel
|
2017-02-10 09:25:50 +01:00
|
|
|
|