ansible.cfg 8.15 KB
Newer Older
Michael DeHaan committed
1 2
# config file for ansible -- http://ansible.com/
# ==============================================
3 4

# nearly all parameters can be overridden in ansible-playbook 
5 6 7 8
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
Michael DeHaan committed
9 10 11

[defaults]

12
# some basic default values...
Michael DeHaan committed
13

14
inventory      = /etc/ansible/hosts
15
#library        = /usr/share/my_modules/
16 17 18 19 20 21 22
remote_tmp     = $HOME/.ansible/tmp
pattern        = *
forks          = 5
poll_interval  = 15
sudo_user      = root
#ask_sudo_pass = True
#ask_pass      = True
23
transport      = smart
24
#remote_port    = 22
25
module_lang    = C
Michael DeHaan committed
26

27 28 29 30 31 32 33
# plays will gather facts by default, which contain information about
# the remote system.
#
# smart - gather by default, but don't regather if already gathered
# implicit - gather by default, turn off with gather_facts: False
# explicit - do not gather by default, must say gather_facts: True
gathering = implicit
34

35
# additional paths to search for roles in, colon separated
36 37
#roles_path    = /etc/ansible/roles

38
# uncomment this to disable SSH key host checking
39
#host_key_checking = False
40

41
# change this for alternative sudo implementations
42
sudo_exe = sudo
Michael DeHaan committed
43

44
# what flags to pass to sudo
45
#sudo_flags = -H
Michael DeHaan committed
46

47
# SSH timeout
48
timeout = 10
49

50 51
# default user to use for playbooks if user is not specified
# (/usr/bin/ansible will use current user as default)
52
#remote_user = root
53

54 55
# logging is off by default unless this path is defined
# if so defined, consider logrotate
56
#log_path = /var/log/ansible.log
57

58
# default module name for /usr/bin/ansible
59
#module_name = command
60

61 62 63
# use this shell for commands executed under sudo
# you may need to change this to bin/bash in rare instances
# if sudo is constrained
64
#executable = /bin/sh
65

66 67 68
# if inventory variables overlap, does the higher precedence one win
# or are hash values merged together?  The default is 'replace' but
# this can also be set to 'merge'.
69
#hash_behaviour = replace
70

71
# list any Jinja2 extensions to enable here:
72
#jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n
Michael DeHaan committed
73

74 75
# if set, always use this private key file for authentication, same as 
# if passing --private-key to ansible or ansible-playbook
76
#private_key_file = /path/to/file
Michael DeHaan committed
77

78 79
# format of string {{ ansible_managed }} available within Jinja2 
# templates indicates to users editing templates files will be replaced.
espro committed
80
# replacing {file}, {host} and {uid} and strftime codes with proper values.
81 82
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}

83
# by default, ansible-playbook will display "Skipping [host]" if it determines a task
84 85 86 87
# should not be run on a host.  Set this to "False" if you don't want to see these "Skipping" 
# messages. NOTE: the task header will still be shown regardless of whether or not the 
# task is skipped.
#display_skipped_hosts = True
88

89 90 91 92
# by default (as of 1.3), Ansible will raise errors when attempting to dereference 
# Jinja2 variables that are not set in templates or action lines. Uncomment this line
# to revert the behavior to pre-1.3.
#error_on_undefined_vars = False
93

94 95 96 97 98 99 100 101 102 103 104
# by default (as of 1.6), Ansible may display warnings based on the configuration of the
# system running ansible itself. This may include warnings about 3rd party packages or
# other conditions that should be resolved if possible.
# to disable these warnings, set the following value to False:
#system_warnings = True

# by default (as of 1.4), Ansible may display deprecation warnings for language
# features that should no longer be used and will be removed in future versions.
# to disable these warnings, set the following value to False:
#deprecation_warnings = True

105
# (as of 1.8), Ansible can optionally warn when usage of the shell and
106 107 108
# command module appear to be simplified by using a default Ansible module
# instead.  These warnings can be silenced by adjusting the following
# setting or adding warn=yes or warn=no to the end of the command line 
109 110 111
# parameter string.  This will for example suggest using the git module
# instead of shelling out to the git command.
# command_warnings = False
112 113


114
# set plugin path directories here, separate with colons
115 116 117 118
action_plugins     = /usr/share/ansible_plugins/action_plugins
callback_plugins   = /usr/share/ansible_plugins/callback_plugins
connection_plugins = /usr/share/ansible_plugins/connection_plugins
lookup_plugins     = /usr/share/ansible_plugins/lookup_plugins
Michael DeHaan committed
119
vars_plugins       = /usr/share/ansible_plugins/vars_plugins
120
filter_plugins     = /usr/share/ansible_plugins/filter_plugins
121

122 123 124 125 126 127
# by default callbacks are not loaded for /bin/ansible, enable this if you
# want, for example, a notification or logging callback to also apply to 
# /bin/ansible runs
#bin_ansible_callbacks = False


128 129
# don't like cows?  that's unfortunate.
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 
130
#nocows = 1
131

132 133 134 135
# don't like colors either?
# set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1
#nocolor = 1

136 137 138 139 140 141 142 143 144 145 146 147 148 149
# the CA certificate path used for validating SSL certs. This path 
# should exist on the controlling node, not the target nodes
# common locations:
# RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt
# Fedora     : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
# Ubuntu     : /usr/share/ca-certificates/cacert.org/cacert.org.crt
#ca_file_path = 

# the http user-agent string to use when fetching urls. Some web server
# operators block the default urllib user agent as it is frequently used
# by malicious attacks/scripts, so we set it to something unique to 
# avoid issues.
#http_user_agent = ansible-agent

150
# if set to a persistent type (not 'memory', for example 'redis') fact values
151 152 153 154 155 156
# from previous runs in Ansible will be stored.  This may be useful when
# wanting to use, for example, IP information from one group of servers
# without having to talk to them in the same playbook run to get their
# current IP information.
fact_caching = memory

157 158 159 160 161

# retry files
#retry_files_enabled = False
#retry_files_save_path = ~/.ansible-retry

162 163 164 165 166 167
[privilege_escalation]
#become=True
#become_method='sudo'
#become_user='root'
#become_ask_pass=False

168 169
[paramiko_connection]

170
# uncomment this line to cause the paramiko connection plugin to not record new host
171
# keys encountered.  Increases performance on new host additions.  Setting works independently of the
172 173
# host key checking setting above.
#record_host_keys=False
174

175 176
# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this
# line to disable this behaviour.
nextus committed
177 178
#pty=False

179 180
[ssh_connection]

181 182 183
# ssh arguments to use
# Leaving off ControlPersist will result in poor performance, so use 
# paramiko on older platforms rather than removing it
184
#ssh_args = -o ControlMaster=auto -o ControlPersist=60s
185

186 187 188 189 190 191 192 193 194 195 196
# The path to use for the ControlPath sockets. This defaults to
# "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with
# very long hostnames or very long path names (caused by long user names or 
# deeply nested home directories) this can exceed the character limit on
# file socket names (108 characters for most platforms). In that case, you 
# may wish to shorten the string below.
# 
# Example: 
# control_path = %(directory)s/%%h-%%r
#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r

197 198 199 200 201 202 203 204 205 206
# Enabling pipelining reduces the number of SSH operations required to 
# execute a module on the remote server. This can result in a significant 
# performance improvement when enabled, however when using "sudo:" you must 
# first disable 'requiretty' in /etc/sudoers
#
# By default, this option is disabled to preserve compatibility with
# sudoers configurations that have requiretty (the default on many distros).
# 
#pipelining = False

207 208
# if True, make ansible use scp if the connection type is ssh 
# (default is sftp)
209
#scp_if_ssh = True
210

211 212
[accelerate]
accelerate_port = 5099
213 214
accelerate_timeout = 30
accelerate_connect_timeout = 5.0
215 216 217 218 219 220 221 222 223 224 225

# The daemon timeout is measured in minutes. This time is measured
# from the last activity to the accelerate daemon.
accelerate_daemon_timeout = 30 

# If set to yes, accelerate_multi_key will allow multiple
# private keys to be uploaded to it, though each user must
# have access to the system via SSH to add a new key. The default
# is "no".
#accelerate_multi_key = yes