2012-03-31 15:08:42 +00:00
'\" t
. \" Title: ansible-playbook
2014-01-30 17:32:05 +00:00
. \" Author: :doctype:manpage
2014-12-09 18:49:05 +00:00
. \" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
2015-07-23 07:39:01 +00:00
. \" Date: 07/23/2015
2012-03-31 15:08:42 +00:00
. \" Manual: System administration commands
2015-07-23 07:39:01 +00:00
. \" Source: Ansible %VERSION%
2012-03-31 15:08:42 +00:00
. \" Language: English
. \"
2015-07-23 07:39:01 +00:00
.TH "ANSIBLE\-PLAYBOOK" "1" "07/23/2015" "Ansible %VERSION%" "System administration commands"
2014-01-30 17:32:05 +00:00
. \" -----------------------------------------------------------------
. \" * Define some portability stuff
. \" -----------------------------------------------------------------
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. \" http://bugs.debian.org/507673
. \" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n (.g .ds Aq \(aq
.el .ds Aq '
2012-03-31 15:08:42 +00:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
.SH "NAME"
ansible-playbook \- run an ansible playbook
.SH "SYNOPSIS"
.sp
ansible\- playbook <filename\& .yml> \& ... [options]
.SH "DESCRIPTION"
.sp
\fB Ansible playbooks\fR 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\& .
.SH "ARGUMENTS"
.PP
\fB filename\& .yml\fR
.RS 4
The names of one or more YAML format files to run as ansible playbooks\& .
.RE
.SH "OPTIONS"
2015-07-22 08:56:50 +00:00
.PP
\fB \- k\fR , \fB \- \- ask\- pass\fR
2012-08-15 14:13:38 +00:00
.RS 4
2015-07-22 08:56:50 +00:00
Prompt for the SSH password instead of assuming key\- based authentication with ssh\- agent\& .
2012-08-15 14:13:38 +00:00
.RE
2012-03-31 15:08:42 +00:00
.PP
2015-07-22 08:56:50 +00:00
\fB \- K\fR , \fB \- \- ask\- sudo\- pass\fR
2012-03-31 15:08:42 +00:00
.RS 4
2015-07-22 08:56:50 +00:00
Prompt for the password to use for playbook plays that request sudo access, if any\& .
2012-03-31 15:08:42 +00:00
.RE
.PP
2015-07-23 07:39:01 +00:00
\fB \- b\fR , \fB \- \- become\fR
.RS 4
Run operations with become (nopasswd implied)
.RE
.PP
\fB \- \- become\- method=BECOME_METHOD\fR
2012-03-31 15:08:42 +00:00
.RS 4
2015-08-18 01:31:18 +00:00
Privilege escalation method to use (default=sudo), valid choices: [ sudo | su | pbrun | pfexec | runas | doas ]
2015-07-23 07:39:01 +00:00
.RE
.PP
\fB \- \- become\- user=BECOME_USER\fR
.RS 4
Run operations as this user (default=None)\& .
.RE
.PP
\fB \- C\fR , \fB \- \- check\fR
.RS 4
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\& .
2012-03-31 15:08:42 +00:00
.RE
2015-07-22 08:56:50 +00:00
.PP
\fB \- c\fR \fI CONNECTION\fR , \fB \- \- connection=\fR \fI CONNECTION\fR
.RS 4
Connection type to use\& . Possible options are
\fI paramiko\fR
(SSH),
\fI ssh\fR , and
\fI local\fR \& .
\fI local\fR
is mostly useful for crontab or kickstarts\& .
.RE
.PP
2015-07-23 07:39:01 +00:00
\fB \- D\fR , \fB \- \- diff\fR
2015-07-22 08:56:50 +00:00
.RS 4
2015-07-23 07:39:01 +00:00
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\& .
2015-07-22 08:56:50 +00:00
.RE
.PP
2015-07-23 07:39:01 +00:00
\fB \- e\fR \fI VARS\fR , \fB \- \- extra\- vars=\fR \fI VARS\fR
2015-07-22 08:56:50 +00:00
.RS 4
2015-07-23 07:39:01 +00:00
Extra variables to inject into a playbook, in key=value key=value format or as quoted JSON (hashes and arrays)\& . To load variables from a file, specify the file preceded by @ (e\& .g\& . @vars\& .yml)\& .
2015-07-22 08:56:50 +00:00
.RE
.PP
2015-07-23 07:39:01 +00:00
\fB \- \- flush\- cache\fR
.RS 4
Clear the fact cache\& .
.RE
2012-03-31 15:08:42 +00:00
.PP
2015-07-23 07:39:01 +00:00
\fB \- \- force\- handlers\fR
2012-04-26 23:56:10 +00:00
.RS 4
2015-07-23 07:39:01 +00:00
Run handlers even if a task fails\& .
2012-04-26 23:56:10 +00:00
.RE
.PP
2012-03-24 02:29:51 +00:00
\fB \- f\fR \fI NUM\fR , \fB \- \- forks=\fR \fI NUM\fR
2012-03-31 15:08:42 +00:00
.RS 4
2012-03-24 02:29:51 +00:00
Level of parallelism\& .
\fI NUM\fR
is specified as an integer, the default is 5\& .
2012-03-31 15:08:42 +00:00
.RE
2015-07-23 07:39:01 +00:00
.PP
\fB \- h\fR , \fB \- \- help\fR
.RS 4
Show help page and exit
.RE
.PP
2015-07-22 08:56:50 +00:00
\fB \- i\fR \fI PATH\fR , \fB \- \- inventory=\fR \fI PATH\fR
2012-03-31 15:08:42 +00:00
.RS 4
2015-07-22 08:56:50 +00:00
The
\fI PATH\fR
to the inventory hosts file, which defaults to
\fI /etc/ansible/hosts\fR \& .
2012-03-31 15:08:42 +00:00
.RE
.PP
2015-07-22 08:56:50 +00:00
\fB \- l\fR \fI SUBSET\fR , \fB \- \- limit=\fR \fI SUBSET\fR
2012-04-13 23:40:40 +00:00
.RS 4
2015-07-22 08:56:50 +00:00
Further limits the selected host/group patterns\& .
2012-08-14 14:46:16 +00:00
.RE
.PP
2015-07-22 08:56:50 +00:00
\fB \- \- list\- hosts\fR
2012-08-14 14:46:16 +00:00
.RS 4
2015-07-22 08:56:50 +00:00
Outputs a list of matching hosts; does not execute anything else\& .
2012-04-13 23:40:40 +00:00
.RE
2015-07-23 07:39:01 +00:00
.PP
\fB \- \- list\- tags\fR
.RS 4
List all available tags\& .
.RE
.PP
2015-07-22 08:56:50 +00:00
\fB \- \- list\- tasks\fR
2014-01-30 17:32:05 +00:00
.RS 4
2015-07-23 07:39:01 +00:00
List all tasks that would be executed
2015-07-22 08:56:50 +00:00
.RE
2015-07-23 07:39:01 +00:00
.PP
2015-07-22 08:56:50 +00:00
\fB \- M\fR \fI DIRECTORY\fR , \fB \- \- module\- path=\fR \fI DIRECTORY\fR
.RS 4
The
\fI DIRECTORY\fR
search path to load modules from\& . The default is
\fI /usr/share/ansible\fR \& . This can also be set with the ANSIBLE_LIBRARY environment variable\& .
.RE
2015-07-23 07:39:01 +00:00
.PP
\fB \- \- private\- key=\fR \fI PRIVATE_KEY_FILE\fR
2015-07-22 08:56:50 +00:00
.RS 4
2015-07-23 07:39:01 +00:00
Use this file to authenticate the connection
2014-01-30 17:32:05 +00:00
.RE
.PP
2015-07-23 07:39:01 +00:00
\fB \- \- skip\- tages=\fR \fI SKIP_TAGS\fR
2013-02-16 20:38:59 +00:00
.RS 4
2014-01-30 17:32:05 +00:00
Only run plays and tasks whose tags do not match these values\& .
2013-02-16 20:38:59 +00:00
.RE
.PP
2015-07-23 07:39:01 +00:00
\fB \- \- start\- at\- task=\fR \fI START_AT\fR
2013-02-16 20:38:59 +00:00
.RS 4
2015-07-23 07:39:01 +00:00
Start the playbook at the task matching this name\& .
.RE
.PP
\fB \- \- step\fR
.RS 4
One\- step\- at\- a\- time: confirm each task before running\& .
.RE
.PP
\fB \- S\fR , \- \- su*
.RS 4
Run operations with su (deprecated, use become)
.RE
.PP
\fB \- R SU\- USER\fR , \fB \- \- su\- user=\fR \fI SU_USER\fR
.RS 4
run operations with su as this user (default=root) (deprecated, use become)
2013-02-16 20:38:59 +00:00
.RE
.PP
2015-07-22 08:56:50 +00:00
\fB \- s\fR , \fB \- \- sudo\fR
2013-02-16 20:38:59 +00:00
.RS 4
2015-07-23 07:39:01 +00:00
Run operations with sudo (nopasswd) (deprecated, use become)
.RE
.PP
\fB \- U\fR , \fI SUDO_USER\fR , \fB \- \- sudo\- user=\fR \fI SUDO_USER\fR
.RS 4
Desired sudo user (default=root) (deprecated, use become)\& .
.RE
.PP
\fB \- \- skip\- tags=\fR \fI SKIP_TAGS\fR
.RS 4
Only run plays and tasks whose tags do not match these values\& .
.RE
.PP
\fB \- \- syntax\- check\fR
.RS 4
Look for syntax errors in the playbook, but don\(cq t run anything
2013-02-16 20:38:59 +00:00
.RE
.PP
2015-07-22 08:56:50 +00:00
\fB \- t\fR , \fI TAGS\fR , \fB \- \- tags=\fR \fI TAGS\fR
2013-02-16 20:38:59 +00:00
.RS 4
2015-07-22 08:56:50 +00:00
Only run plays and tasks tagged with these values\& .
2013-02-16 20:38:59 +00:00
.RE
.PP
2012-03-24 02:29:51 +00:00
\fB \- T\fR \fI SECONDS\fR , \fB \- \- timeout=\fR \fI SECONDS\fR
2012-03-31 15:08:42 +00:00
.RS 4
2012-03-24 02:29:51 +00:00
Connection timeout to use when trying to talk to hosts, in
\fI SECONDS\fR \& .
2012-03-31 15:08:42 +00:00
.RE
2012-04-13 23:40:40 +00:00
.PP
2015-07-23 07:39:01 +00:00
\fB \- u\fR \fI USERNAME\fR , \fB \- \- user=\fR \fI USERNAME\fR
.RS 4
Use this remote user name on playbook steps that do not indicate a user name to run as\& .
.RE
.PP
\fB \- \- vault\- password\- file=\fR \fI VAULT_PASSWORD_FILE\fR
.RS 4
Vault password file\& .
.RE
.PP
2015-07-22 08:56:50 +00:00
\fB \- v\fR , \fB \- \- verbose\fR
2012-09-06 22:42:18 +00:00
.RS 4
2015-07-22 08:56:50 +00:00
Verbose mode, more output from successful actions will be shown\& . Give up to three times for more output\& .
2012-09-06 22:42:18 +00:00
.RE
2015-02-27 13:38:45 +00:00
.PP
2015-07-23 07:39:01 +00:00
\fB \- \- version\fR
.RS 4
Show program\(cq s version number and exit\& .
.RE
.SH "ENVIRONMENT"
.sp
2014-02-11 15:50:10 +00:00
The following environment variables may be specified\& .
2012-03-31 15:08:42 +00:00
.sp
2015-05-05 13:24:36 +00:00
ANSIBLE_INVENTORY \(em Override the default ansible inventory file
2012-03-31 15:08:42 +00:00
.sp
ANSIBLE_LIBRARY \(em Override the default ansible module library path
2012-10-12 21:49:48 +00:00
.SH "FILES"
.sp
/etc/ansible/hosts \(em Default inventory file
.sp
/usr/share/ansible/ \(em Default module library
.sp
2012-11-03 22:54:38 +00:00
/etc/ansible/ansible\& .cfg \(em Config file, used if present
2012-10-12 21:49:48 +00:00
.sp
2012-11-03 22:54:38 +00:00
~/\& .ansible\& .cfg \(em User config file, overrides the default config if present
2012-03-31 15:08:42 +00:00
.SH "AUTHOR"
.sp
Ansible was originally written by Michael DeHaan\& . See the AUTHORS file for a complete list of contributors\& .
.SH "COPYRIGHT"
.sp
Copyright \(co 2012, Michael DeHaan
.sp
Ansible is released under the terms of the GPLv3 License\& .
.SH "SEE ALSO"
.sp
2013-04-03 00:47:57 +00:00
\fB ansible\fR (1), \fB ansible\- pull\fR (1), \fB ansible\- doc\fR (1)
2012-03-31 15:08:42 +00:00
.sp
2014-02-12 22:14:41 +00:00
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
2015-05-05 13:24:36 +00:00
.SH "AUTHOR"
.PP
\fB :doctype:manpage\fR
.RS 4
Author.
.RE