ansible.cfg 4.34 KB
Newer Older
Michael DeHaan committed
1 2
# config file for ansible -- http://ansible.github.com
# nearly all parameters can be overridden in ansible-playbook or with command line flags
3
# ansible will read ~/.ansible.cfg or /etc/ansible/ansible.cfg, whichever it finds first
Michael DeHaan committed
4 5 6 7 8 9 10 11 12

[defaults]

# location of inventory file, eliminates need to specify -i

hostfile = /etc/ansible/hosts

# location of ansible library, eliminates need to specify --module-path

13
library = /usr/share/ansible
Michael DeHaan committed
14 15 16 17 18 19 20 21 22 23

# default module name used in /usr/bin/ansible when -m is not specified

module_name = command

# home directory where temp files are stored on remote systems.  Should
# almost always contain $HOME or be a directory writeable by all users

remote_tmp = $HOME/.ansible/tmp

24
# the default pattern for ansible-playbooks ("hosts:")
Michael DeHaan committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

pattern = *

# the default number of forks (parallelism) to be used.  Usually you
# can crank this up.

forks=5

# the timeout used by various connection types.  Usually this corresponds
# to an SSH timeout

timeout=10

# when using --poll or "poll:" in an ansible playbook, and not specifying
# an explicit poll interval, use this interval

poll_interval=15

# when specifying --sudo to /usr/bin/ansible or "sudo:" in a playbook,
# and not specifying "--sudo-user" or "sudo_user" respectively, sudo
# to this user account

sudo_user=root

49 50
# the following forces ansible to always ask for the sudo password (instead of having
# to add -K to the commandline). Or you can use the environment variable (ANSIBLE_ASK_SUDO_PASS)
51 52 53

#ask_sudo_pass=True

54
# the following forces ansible to always ask for the ssh-password (-k)
55 56
# can also be set by the environment variable ANSIBLE_ASK_PASS

57
#ask_pass=True
58

Michael DeHaan committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
# connection to use when -c <connection_type> is not specified

transport=paramiko

# remote SSH port to be used when --port or "port:" or an equivalent inventory
# variable is not specified.

remote_port=22

# if set, always run /usr/bin/ansible commands as this user, and assume this value
# if "user:" is not set in a playbook.  If not set, use the current Unix user
# as the default

#remote_user=root

74 75 76 77 78
# the default sudo executable. If a sudo alternative with a sudo-compatible interface
# is used, specify its executable name as the default

sudo_exe=sudo

79 80 81
# the default flags passed to sudo
# sudo_flags=-H

82 83 84 85 86 87 88 89 90 91
# how to handle hash defined in several places
# hash can be merged, or replaced
# if you use replace, and have multiple hashes named 'x', the last defined
# will override the previously defined one
# if you use merge here, hash will cumulate their keys, but keys will still
# override each other
# replace is the default value, and is how ansible always handled hash variables
#
# hash_behaviour=replace

92 93
# if you need to use jinja2 extensions, you can list them here
# use a coma to separate extensions, e.g. :
Michel Blanc committed
94
# jinja2_extensions=jinja2.ext.do,jinja2.ext.i18n
95 96
# no extensions are loaded by default

Michel Blanc committed
97
#jinja2_extensions=
98

Michael DeHaan committed
99
# if set, always use this private key file for authentication, same as if passing
100
# --private-key to ansible or ansible-playbook
Michael DeHaan committed
101 102 103

#private_key_file=/path/to/file

104 105 106 107 108 109 110 111
# format of string $ansible_managed available within Jinja2 templates, replacing
# {file}, {host} and {uid} with template filename, host and owner respectively.
# The resulting string is passed through strftime(3) so it may contain any
# time-formatting specifiers.
#
# Example: ansible_managed = DONT TOUCH {file}: call {uid} at {host} for changes
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}

112 113 114 115 116 117
# additional plugin paths for non-core plugins

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
118
vars_plugins       = /usr/share/ansible_plugins/vars_plugins
119
filter_plugins     = /usr/share/ansible_plugins/filter_plugins
120

121 122 123 124 125 126 127 128 129 130
[paramiko_connection]

# nothing to configure yet

[ssh_connection]

# if uncommented, sets the ansible ssh arguments to the following.  Leaving off ControlPersist
# will result in poor performance, so use transport=paramiko on older platforms rather than
# removing it

131
ssh_args=-o PasswordAuthentication=no -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=/tmp/ansible-ssh-%h-%p-%r
132

133 134 135 136
# the following makes ansible use scp if the connection type is ssh (default is sftp)

#scp_if_ssh=True

137