'\" t
. \" Title: ansible
. \" Author: [see the "AUTHOR" section]
. \" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
. \" Date: 09/13/2013
. \" Manual: System administration commands
. \" Source: Ansible 1.4
. \" Language: English
. \"
.TH "ANSIBLE" "1" "09/13/2013" "Ansible 1\&.4" "System administration commands"
. \" -----------------------------------------------------------------
. \" * 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 '
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
.SH "NAME"
ansible \- run a command somewhere else
.SH "SYNOPSIS"
.sp
ansible <host\- pattern> [\- f forks] [\- m module_name] [\- a args]
.SH "DESCRIPTION"
.sp
\fB Ansible\fR is an extra\- simple tool/framework/API for doing \* (Aqremote things\* (Aq over SSH\& .
.SH "ARGUMENTS"
.PP
\fB host\- pattern\fR
.RS 4
A name of a group in the inventory file, a shell\- like glob selecting hosts in inventory file, or any combination of the two separated by semicolons\& .
.RE
.SH "OPTIONS"
.PP
\fB \- v\fR , \fB \- \- verbose\fR
.RS 4
Verbose mode, more output from successful actions will be shown\& . Give up to three times for more output\& .
.RE
.PP
\fB \- i\fR \fI PATH\fR , \fB \- \- inventory=\fR \fI PATH\fR
.RS 4
The
\fI PATH\fR
to the inventory hosts file, which defaults to
\fI /etc/ansible/hosts\fR \& .
.RE
.PP
\fB \- f\fR \fI NUM\fR , \fB \- \- forks=\fR \fI NUM\fR
.RS 4
Level of parallelism\& .
\fI NUM\fR
is specified as an integer, the default is 5\& .
.RE
.PP
\fB \- \- private\- key=\fR \fI PRIVATE_KEY_FILE\fR
.RS 4
Use this file to authenticate the connection\& .
.RE
.PP
\fB \- m\fR \fI NAME\fR , \fB \- \- module\- name=\fR \fI NAME\fR
.RS 4
Execute the module called
\fI NAME\fR \& .
.RE
.PP
\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
.PP
\fB \- a\fR \* (Aq\fI ARGUMENTS\fR \* (Aq, \fB \- \- args=\fR \* (Aq\fI ARGUMENTS\fR \* (Aq
.RS 4
The
\fI ARGUMENTS\fR
to pass to the module\& .
.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
\fB \- K\fR , \fB \- \- ask\- sudo\- pass\fR
.RS 4
Prompt for the password to use with \- \- sudo, if any
.RE
.PP
\fB \- o\fR , \fB \- \- one\- line\fR
.RS 4
Try to output everything on one line\& .
.RE
.PP
\fB \- s\fR , \fB \- \- sudo\fR
.RS 4
Run the command as the user given by \- u and sudo to root\& .
.RE
.PP
\fB \- t\fR \fI DIRECTORY\fR , \fB \- \- tree=\fR \fI DIRECTORY\fR
.RS 4
Save contents in this output
\fI DIRECTORY\fR , with the results saved in a file named after each host\& .
.RE
.PP
\fB \- T\fR \fI SECONDS\fR , \fB \- \- timeout=\fR \fI SECONDS\fR
.RS 4
Connection timeout to use when trying to talk to hosts, in
\fI SECONDS\fR \& .
.RE
.PP
\fB \- B\fR \fI NUM\fR , \fB \- \- background=\fR \fI NUM\fR
.RS 4
Run commands in the background, killing the task after
\fI NUM\fR
seconds\& .
.RE
.PP
\fB \- P\fR \fI NUM\fR , \fB \- \- poll=\fR \fI NUM\fR
.RS 4
Poll a background job every
\fI NUM\fR
seconds\& . Requires
\fB \- B\fR \& .
.RE
.PP
\fB \- u\fR \fI USERNAME\fR , \fB \- \- remote\- user=\fR \fI USERNAME\fR
.RS 4
Use this remote
\fI USERNAME\fR
instead of the current user\& .
.RE
.PP
\fB \- U\fR \fI SUDO_USERNAME\fR , \fB \- \- sudo\- user=\fR \fI SUDO_USERNAME\fR
.RS 4
Sudo to
\fI SUDO_USERNAME\fR
instead of root\& . Implies \- \- sudo\& .
.RE
.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
\fB \- l\fR \fI SUBSET\fR , \fB \- \- limit=\fR \fI SUBSET\fR
.RS 4
Further limits the selected host/group patterns\& .
.RE
.PP
\fB \- l\fR \fI ~REGEX\fR , \fB \- \- limit=\fR \fI ~REGEX\fR
.RS 4
Further limits hosts with a regex pattern\& .
.RE
.SH "INVENTORY"
.sp
Ansible stores the hosts it can potentially operate on in an inventory file\& . The syntax is one host per line\& . Groups headers are allowed and are included on their own line, enclosed in square brackets that start the line\& .
.sp
Ranges of hosts are also supported\& . For more information and additional options, see the documentation on http://ansible\& .github\& .com/\& .
.SH "FILES"
.sp
/etc/ansible/hosts \(em Default inventory file
.sp
/usr/share/ansible/ \(em Default module library
.sp
/etc/ansible/ansible\& .cfg \(em Config file, used if present
.sp
~/\& .ansible\& .cfg \(em User config file, overrides the default config if present
.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
.sp
ANSIBLE_CONFIG \(em Override the default ansible config file
.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
\fB ansible\- playbook\fR (1), \fB ansible\- pull\fR (1), \fB ansible\- doc\fR (1)
.sp
Extensive documentation as well as IRC and mailing list info is available on the ansible home page: https://ansible\& .github\& .com/