* Edit pass 1 for #30490 - command line tools and developing plugins. * Continuing edit pass for #30490. WIP * Last round of copy edits for #30490.
2.5 KiB
Configuration
Topics
This topic describes how to control Ansible settings.
Configuration file
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.
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 more details and a full listing of available configurations go to
:doc:configuration. Starting with Ansible version 2.4, you can use the
ansible-config
command
line utility to list your available options and inspect the current
values.
For in depth details you check out config
.
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
config
.
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
.
intro_dynamic_inventory
-
Pulling inventory from dynamic sources, such as cloud providers
intro_adhoc
-
Examples of basic commands
playbooks
-
Learning Ansible's configuration, deployment, and orchestration language.
config
-
Ansible's configuration file and environment settings in detail
command_line_tools
-
Ansible's command line tools documentation and detailed options
- Mailing List
-
Questions? Help? Ideas? Stop by the list on Google Groups
- irc.freenode.net
-
#ansible IRC chat channel