2012-03-31 17:08:42 +02:00
'\" t
. \" Title: ansible
2014-05-26 14:12:39 +02:00
. \" Author: :doctype:manpage
2014-12-09 19:49:05 +01:00
. \" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
2015-07-22 10:56:50 +02:00
. \" Date: 07/15/2015
2012-03-31 17:08:42 +02:00
. \" Manual: System administration commands
2015-07-22 10:56:50 +02:00
. \" Source: Ansible %VERSION%
2012-03-31 17:08:42 +02:00
. \" Language: English
. \"
2015-07-22 10:56:50 +02:00
.TH "ANSIBLE" "1" "07/15/2015" "Ansible %VERSION%" "System administration commands"
2014-05-26 14:12:39 +02: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 17:08:42 +02:00
. \" -----------------------------------------------------------------
. \" * 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
2014-05-26 14:12:39 +02:00
\fB Ansible\fR is an extra\- simple tool/framework/API for doing \* (Aqremote things\* (Aq over SSH\& .
2012-03-31 17:08:42 +02:00
.SH "ARGUMENTS"
.PP
\fB host\- pattern\fR
.RS 4
2012-03-24 03:29:51 +01:00
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\& .
2012-03-31 17:08:42 +02:00
.RE
.SH "OPTIONS"
.PP
2015-07-22 10:56:50 +02:00
\fB \- a\fR \* (Aq\fI ARGUMENTS\fR \* (Aq, \fB \- \- args=\fR \* (Aq\fI ARGUMENTS\fR \* (Aq
2012-08-15 16:13:38 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
The
\fI ARGUMENTS\fR
to pass to the module\& .
.RE
.PP
\fB \- \- ask\- become\- pass\fR
.RS 4
Ask for privilege escalation password\& .
.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 \- \- ask\- su\- pass\fR
.RS 4
Prompt for su password (deprecated, use become)\& .
.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 \- \- ask\- vault\- pass\fR
.RS 4
Prompt for vault password\& .
.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 \- \- become\- method=\fR \fI BECOME_METHOD\fR
.RS 4
2015-08-18 03:31:18 +02:00
Privilege escalation method to use (default=sudo), valid choices: [ sudo | su | pbrun | pfexec | runas | doas ]
2015-07-22 10:56:50 +02:00
.RE
.PP
\fB \- \- become\- user=\fR \fI BECOME_USER\fR
.RS 4
Run operations as this user (default=None)\& .
.RE
.PP
\fB \- C\fR , \fB \- \- check\fR
.RS 4
Don\(cq t make any changes; instead try to predict some of the changes that may occur\& .
.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 \- e\fR \fI EXTRA_VARS*, \fR \fI \fB \- \- extra\- vars=\fR \fR \fI \* (AqEXTRA_VARS\fR
.RS 4
Set additional variables as key=value or YAML/JSON\& .
.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 \- h\fR , \fB \- \- help\fR
.RS 4
Show help message and exit\& .
2012-08-15 16:13:38 +02:00
.RE
.PP
2012-03-24 03:29:51 +01:00
\fB \- i\fR \fI PATH\fR , \fB \- \- inventory=\fR \fI PATH\fR
2012-03-31 17:08:42 +02:00
.RS 4
2012-03-24 03:29:51 +01:00
The
\fI PATH\fR
to the inventory hosts file, which defaults to
\fI /etc/ansible/hosts\fR \& .
2012-03-31 17:08:42 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\fB \- l\fR \fI SUBSET\fR , \fB \- \- limit=\fR \fI SUBSET\fR
2012-03-31 17:08:42 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
Further limits the selected host/group patterns\& .
2012-03-31 17:08:42 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\fB \- l\fR \fI ~REGEX\fR , \fB \- \- limit=\fR \fI ~REGEX\fR
2012-08-14 16:46:16 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
Further limits hosts with a regex pattern\& .
.RE
.PP
\fB \- \- list\- hosts\fR
.RS 4
Outputs a list of matching hosts; does not execute anything else\& .
2012-08-14 16:46:16 +02:00
.RE
.PP
2012-03-24 03:29:51 +01:00
\fB \- m\fR \fI NAME\fR , \fB \- \- module\- name=\fR \fI NAME\fR
2012-03-31 17:08:42 +02:00
.RS 4
2012-03-24 03:29:51 +01:00
Execute the module called
\fI NAME\fR \& .
2012-03-31 17:08:42 +02:00
.RE
.PP
2012-03-24 03:29:51 +01:00
\fB \- M\fR \fI DIRECTORY\fR , \fB \- \- module\- path=\fR \fI DIRECTORY\fR
2012-03-31 17:08:42 +02:00
.RS 4
2012-03-24 03:29:51 +01:00
The
\fI DIRECTORY\fR
2013-05-29 16:30:04 +02:00
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\& .
2012-03-31 17:08:42 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\fB \- o\fR , \fB \- \- one\- line\fR
2012-03-31 17:08:42 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
Try to output everything on one line\& .
2012-03-31 17:08:42 +02:00
.RE
2012-04-17 17:39:51 +02:00
.PP
2015-07-22 10:56:50 +02:00
\fB \- P\fR \fI NUM\fR , \fB \- \- poll=\fR \fI NUM\fR
2012-04-17 17:39:51 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
Poll a background job every
\fI NUM\fR
seconds\& . Requires
\fB \- B\fR \& .
2012-04-17 17:39:51 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\fB \- \- private\- key=\fR \fI PRIVATE_KEY_FILE\fR
2012-04-17 17:39:51 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
Use this file to authenticate the connection\& .
2012-04-17 17:39:51 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\fB \- S\fR , \fB \- \- su\fR
2012-04-17 17:39:51 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
Run operations with su (deprecated, use become)\& .
.RE
.PP
\fB \- R\fR \fI SU_USER\fR , \fB \- \- se\- user=\fR \fI SUDO_USER\fR
.RS 4
Run operations with su as this user (default=root) (deprecated, use become)
2012-04-17 17:39:51 +02:00
.RE
.PP
2012-04-14 01:40:40 +02:00
\fB \- s\fR , \fB \- \- sudo\fR
2012-04-17 17:39:51 +02:00
.RS 4
2015-05-05 15:24:36 +02:00
Run the command as the user given by \- u and sudo to root\& .
2012-04-17 17:39:51 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\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
2012-03-24 03:29:51 +01:00
\fB \- t\fR \fI DIRECTORY\fR , \fB \- \- tree=\fR \fI DIRECTORY\fR
2012-04-17 17:39:51 +02:00
.RS 4
Save contents in this output
\fI DIRECTORY\fR , with the results saved in a file named after each host\& .
.RE
.PP
2012-03-24 03:29:51 +01:00
\fB \- T\fR \fI SECONDS\fR , \fB \- \- timeout=\fR \fI SECONDS\fR
2012-04-17 17:39:51 +02:00
.RS 4
Connection timeout to use when trying to talk to hosts, in
\fI SECONDS\fR \& .
.RE
.PP
2013-11-19 00:55:49 +01:00
\fB \- u\fR \fI USERNAME\fR , \fB \- \- user=\fR \fI USERNAME\fR
2012-04-17 17:39:51 +02:00
.RS 4
Use this remote
\fI USERNAME\fR
2013-02-10 04:24:53 +01:00
instead of the current user\& .
2012-04-17 17:39:51 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\fB \- \- vault\- password\- file=\fR \fI VAULT_PASSWORD_FILE\fR
2012-05-07 00:32:43 +02:00
.RS 4
2015-07-22 10:56:50 +02:00
Vault password file\& .
2012-05-07 00:32:43 +02:00
.RE
.PP
2015-07-22 10:56:50 +02:00
\fB \- v\fR , \fB \- \- verbose\fR
2012-12-02 10:18:58 +01:00
.RS 4
2015-07-22 10:56:50 +02:00
Verbose mode, more output from successful actions will be shown\& . Give up to three times for more output\& .
2012-12-02 10:18:58 +01:00
.RE
2015-02-27 14:38:45 +01:00
.PP
2015-07-22 10:56:50 +02:00
\fB \- \- version\fR
2015-02-27 14:38:45 +01:00
.RS 4
2015-07-22 10:56:50 +02:00
Show program version number and exit\& .
2015-02-27 14:38:45 +01:00
.RE
2012-03-31 17:08:42 +02:00
.SH "INVENTORY"
.sp
2012-07-25 02:10:05 +02:00
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
2014-05-26 14:12:39 +02:00
Ranges of hosts are also supported\& . For more information and additional options, see the documentation on http://docs\& .ansible\& .com/\& .
2012-03-31 17:08:42 +02:00
.SH "FILES"
.sp
/etc/ansible/hosts \(em Default inventory file
.sp
/usr/share/ansible/ \(em Default module library
2012-10-12 23:49:48 +02:00
.sp
2012-11-03 23:54:38 +01:00
/etc/ansible/ansible\& .cfg \(em Config file, used if present
2012-10-12 23:49:48 +02:00
.sp
2012-11-03 23:54:38 +01:00
~/\& .ansible\& .cfg \(em User config file, overrides the default config if present
2012-03-31 17:08:42 +02:00
.SH "ENVIRONMENT"
.sp
2014-02-11 16:50:10 +01:00
The following environment variables may be specified\& .
2012-03-31 17:08:42 +02:00
.sp
2015-05-05 15:24:36 +02:00
ANSIBLE_INVENTORY \(em Override the default ansible inventory file
2012-03-31 17:08:42 +02:00
.sp
ANSIBLE_LIBRARY \(em Override the default ansible module library path
2012-11-03 23:54:38 +01:00
.sp
ANSIBLE_CONFIG \(em Override the default ansible config file
2012-03-31 17:08:42 +02: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 02:47:57 +02:00
\fB ansible\- playbook\fR (1), \fB ansible\- pull\fR (1), \fB ansible\- doc\fR (1)
2012-03-31 17:08:42 +02:00
.sp
2014-05-26 14:12:39 +02: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 15:24:36 +02:00
.SH "AUTHOR"
.PP
\fB :doctype:manpage\fR
.RS 4
Author.
.RE