ansible-playbook.1.asciidoc.in 3.73 KB
Newer Older
1 2 3 4
ansible-playbook(1)
===================
:doctype:manpage
:man source:   Ansible
5
:man version:  %VERSION%
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
:man manual:   System administration commands

NAME
----
ansible-playbook - run an ansible playbook


SYNOPSIS
--------
ansible-playbook <filename.yml> ... [options]


DESCRIPTION
-----------

21 22 23
*Ansible playbooks* are a configuration and multinode deployment
system.  Ansible-playbook is the tool used to run them.  See the
project home page (link below) for more information.
24 25 26 27 28 29 30 31 32 33 34 35 36


ARGUMENTS
---------

*filename.yml*::

The names of one or more YAML format files to run as ansible playbooks.


OPTIONS
-------

37
*-v*, *--verbose*::
38

39 40
Verbose mode, more output from successful actions will be shown. Give
up to three times for more output.
41

42
*-i* 'PATH', *--inventory=*'PATH'::
43

44 45
The 'PATH' to the inventory hosts file, which defaults to
'/etc/ansible/hosts'.
46 47


48
*-M* 'DIRECTORY', *--module-path=*'DIRECTORY'::
49

50
The 'DIRECTORY' search path to load modules from. The default is
51 52
'/usr/share/ansible'. This can also be set with the ANSIBLE_LIBRARY
environment variable.
53

54 55
*-e* 'VARS', *--extra-vars=*'VARS'::

56
Extra variables to inject into a playbook, in key=value key=value format or
Michael DeHaan committed
57
as quoted JSON (hashes and arrays).
58

59
*-f* 'NUM', *--forks=*'NUM'::
60

61
Level of parallelism. 'NUM' is specified as an integer, the default is 5.
62 63 64 65


*-k*, *--ask-pass*::

66 67
Prompt for the SSH password instead of assuming key-based
authentication with ssh-agent.
68 69


70 71
*-K*, *--ask-sudo-pass*::

72 73
Prompt for the password to use for playbook plays that request sudo
access, if any.
74

75 76 77
*-U*, 'SUDO_USER', *--sudo-user=*'SUDO_USER'::

Desired sudo user (default=root).
78

79
*-t*, 'TAGS', *--tags=*'TAGS'::
80

81 82
Only run plays and tasks tagged with these values.

83
*--skip-tags=*'SKIP_TAGS'::
84 85

Only run plays and tasks whose tags do not match these values.
86

87
*--syntax-check*::
88 89 90 91 92 93 94 95 96 97 98 99 100 101

Look for syntax errors in the playbook, but don't run anything

*--check*::

Do not make any changes on the remote system, but test resources to see what might
have changed.  Note this can not scan all possible resource types and is only
a simulation.

*--diff*::

When changing any templated files, show the unified diffs of how they changed.  When
used with --check, shows how the files would have changed if --check were not used.

102
*-T* 'SECONDS', *--timeout=*'SECONDS'::
103

104
Connection timeout to use when trying to talk to hosts, in 'SECONDS'.
105 106


107
*-s*, *--sudo*::
108 109 110 111

Force all plays to use sudo, even if not marked as such.


Ray committed
112
*-u* 'USERNAME', *--user=*'USERNAME'::
113

114 115 116 117 118 119 120 121
Use this remote user name on playbook steps that do not indicate a
user name to run as.

*-c* 'CONNECTION', *--connection=*'CONNECTION'::

Connection type to use.  Possible options are 'paramiko' (SSH), 'ssh',
and 'local'.  'local' is mostly useful for crontab or kickstarts.

Michael DeHaan committed
122 123 124
*-l* 'SUBSET', *--limit=*'SUBSET'::

Further limits the selected host/group patterns.
125 126


127 128 129
ENVIRONMENT
-----------

130
The following environment variables may be specified.
131 132 133 134 135

ANSIBLE_HOSTS  -- Override the default ansible hosts file

ANSIBLE_LIBRARY -- Override the default ansible module library path

Michael DeHaan committed
136 137 138 139 140 141 142
FILES
-----

/etc/ansible/hosts -- Default inventory file

/usr/share/ansible/ -- Default module library

143
/etc/ansible/ansible.cfg -- Config file, used if present
Michael DeHaan committed
144

145
~/.ansible.cfg -- User config file, overrides the default config if present
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164

AUTHOR
------

Ansible was originally written by Michael DeHaan. See the AUTHORS file
for a complete list of contributors.


COPYRIGHT
---------

Copyright © 2012, Michael DeHaan

Ansible is released under the terms of the GPLv3 License.


SEE ALSO
--------

165
*ansible*(1), *ansible-pull*(1), *ansible-doc*(1)
166

167 168 169
Extensive documentation is available in the documentation site:
<http://docs.ansible.com>. IRC and mailing list info can be found
in file CONTRIBUTING.md, available in: <https://github.com/ansible/ansible>