ansible-playbook.1 4.74 KB
Newer Older
1 2
'\" t
.\"     Title: ansible-playbook
3 4 5
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 11/27/2013
6
.\"    Manual: System administration commands
7
.\"    Source: Ansible 1.4.1
8 9
.\"  Language: English
.\"
10
.TH "ANSIBLE\-PLAYBOOK" "1" "11/27/2013" "Ansible 1\&.4\&.1" "System administration commands"
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
.\" -----------------------------------------------------------------
.\" * 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
\fBAnsible 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
\fBfilename\&.yml\fR
.RS 4
The names of one or more YAML format files to run as ansible playbooks\&.
.RE
.SH "OPTIONS"
36
.PP
37
\fB\-v\fR, \fB\-\-verbose\fR
38 39 40
.RS 4
Verbose mode, more output from successful actions will be shown\&. Give up to three times for more output\&.
.RE
41
.PP
42
\fB\-i\fR \fIPATH\fR, \fB\-\-inventory=\fR\fIPATH\fR
43
.RS 4
44 45 46 47
The
\fIPATH\fR
to the inventory hosts file, which defaults to
\fI/etc/ansible/hosts\fR\&.
48 49
.RE
.PP
50
\fB\-M\fR \fIDIRECTORY\fR, \fB\-\-module\-path=\fR\fIDIRECTORY\fR
51
.RS 4
52 53
The
\fIDIRECTORY\fR
54 55
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\&.
56 57
.RE
.PP
58 59
\fB\-e\fR \fIVARS\fR, \fB\-\-extra\-vars=\fR\fIVARS\fR
.RS 4
Michael DeHaan committed
60
Extra variables to inject into a playbook, in key=value key=value format or as quoted JSON (hashes and arrays)\&.
61 62
.RE
.PP
63
\fB\-f\fR \fINUM\fR, \fB\-\-forks=\fR\fINUM\fR
64
.RS 4
65 66 67
Level of parallelism\&.
\fINUM\fR
is specified as an integer, the default is 5\&.
68 69 70 71 72 73 74
.RE
.PP
\fB\-k\fR, \fB\-\-ask\-pass\fR
.RS 4
Prompt for the SSH password instead of assuming key\-based authentication with ssh\-agent\&.
.RE
.PP
Michael DeHaan committed
75 76
\fB\-K\fR, \fB\-\-ask\-sudo\-pass\fR
.RS 4
Tim Bielawa committed
77 78 79 80 81 82
Prompt for the password to use for playbook plays that request sudo access, if any\&.
.RE
.PP
\fB\-U\fR, \fISUDO_USER\fR, \fB\-\-sudo\-user=\fR\fISUDO_USER\fR
.RS 4
Desired sudo user (default=root)\&.
Michael DeHaan committed
83 84
.RE
.PP
85 86 87 88 89
\fB\-\-tags\fR
.RS 4
Run only these tags from the playbook
.RE
.PP
90
\fB\-\-syntax\-check\fR
91 92 93 94 95 96 97 98 99 100 101 102 103 104
.RS 4
Look for syntax errors in the playbook, but don\(cqt run anything
.RE
.PP
\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\&.
.RE
.PP
\fB\-\-diff\fR
.RS 4
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\&.
.RE
.PP
105
\fB\-T\fR \fISECONDS\fR, \fB\-\-timeout=\fR\fISECONDS\fR
106
.RS 4
107 108
Connection timeout to use when trying to talk to hosts, in
\fISECONDS\fR\&.
109
.RE
Michael DeHaan committed
110
.PP
111
\fB\-s\fR, \fB\-\-sudo\fR
112
.RS 4
113
Force all plays to use sudo, even if not marked as such\&.
114 115
.RE
.PP
116
\fB\-u\fR \fIUSERNAME\fR, \fB\-\-user=\fR\fIUSERNAME\fR
117
.RS 4
118
Use this remote user name on playbook steps that do not indicate a user name to run as\&.
119
.RE
Tim Bielawa committed
120 121 122 123 124 125 126 127 128 129 130
.PP
\fB\-c\fR \fICONNECTION\fR, \fB\-\-connection=\fR\fICONNECTION\fR
.RS 4
Connection type to use\&. Possible options are
\fIparamiko\fR
(SSH),
\fIssh\fR, and
\fIlocal\fR\&.
\fIlocal\fR
is mostly useful for crontab or kickstarts\&.
.RE
Michael DeHaan committed
131 132 133 134 135
.PP
\fB\-l\fR \fISUBSET\fR, \fB\-\-limit=\fR\fISUBSET\fR
.RS 4
Further limits the selected host/group patterns\&.
.RE
136 137 138 139 140 141 142
.SH "ENVIRONMENT"
.sp
The following environment variables may specified\&.
.sp
ANSIBLE_HOSTS  \(em Override the default ansible hosts file
.sp
ANSIBLE_LIBRARY \(em Override the default ansible module library path
143 144 145 146 147 148
.SH "FILES"
.sp
/etc/ansible/hosts \(em Default inventory file
.sp
/usr/share/ansible/ \(em Default module library
.sp
149
/etc/ansible/ansible\&.cfg \(em Config file, used if present
150
.sp
151
~/\&.ansible\&.cfg \(em User config file, overrides the default config if present
152 153 154 155 156 157 158 159 160 161
.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
Michael DeHaan committed
162
\fBansible\fR(1), \fBansible\-pull\fR(1), \fBansible\-doc\fR(1)
163 164
.sp
Extensive documentation as well as IRC and mailing list info is available on the ansible home page: https://ansible\&.github\&.com/