2012-03-07 17:35:18 +01:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2012-04-01 04:31:42 +02:00
< html xmlns = "http://www.w3.org/1999/xhtml" > < head > < meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" / > < title > ansible< / title > < link rel = "stylesheet" href = "./docbook-xsl.css" type = "text/css" / > < meta name = "generator" content = "DocBook XSL Stylesheets V1.75.2" / > < / head > < body > < div xml:lang = "en" class = "refentry" title = "ansible" lang = "en" > < a id = "id482296" > < / a > < div class = "titlepage" > < / div > < div class = "refnamediv" > < h2 > Name< / h2 > < p > ansible — run a command somewhere else< / p > < / div > < div class = "refsynopsisdiv" title = "Synopsis" > < a id = "_synopsis" > < / a > < h2 > Synopsis< / h2 > < p > ansible < host-pattern> [-f forks] [-m module_name] [-a args]< / p > < / div > < div class = "refsect1" title = "DESCRIPTION" > < a id = "_description" > < / a > < h2 > DESCRIPTION< / h2 > < p > < span class = "strong" > < strong > Ansible< / strong > < / span > is an extra-simple tool/framework/API for doing 'remote things' over
2012-03-07 17:35:18 +01:00
SSH.< / p > < / div > < div class = "refsect1" title = "ARGUMENTS" > < a id = "_arguments" > < / a > < h2 > ARGUMENTS< / h2 > < div class = "variablelist" > < dl > < dt > < span class = "term" >
< span class = "strong" > < strong > host-pattern< / strong > < / span >
< / span > < / dt > < dd >
2012-03-24 03:38:29 +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-07 17:35:18 +01:00
< / dd > < / dl > < / div > < / div > < div class = "refsect1" title = "OPTIONS" > < a id = "_options" > < / a > < h2 > OPTIONS< / h2 > < div class = "variablelist" > < dl > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -i< / strong > < / span > < span class = "emphasis" > < em > PATH< / em > < / span > , < span class = "strong" > < strong > --inventory=< / strong > < / span > < span class = "emphasis" > < em > PATH< / em > < / span >
2012-03-07 17:35:18 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
The < span class = "emphasis" > < em > PATH< / em > < / span > to the inventory hosts file, which defaults to < span class = "emphasis" > < em > /etc/ansible/hosts< / em > < / span > .
2012-03-07 17:35:18 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -f< / strong > < / span > < span class = "emphasis" > < em > NUM< / em > < / span > , < span class = "strong" > < strong > --forks=< / strong > < / span > < span class = "emphasis" > < em > NUM< / em > < / span >
2012-03-07 17:35:18 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
Level of parallelism. < span class = "emphasis" > < em > NUM< / em > < / span > is specified as an integer, the default is 5.
2012-03-07 17:35:18 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -m< / strong > < / span > < span class = "emphasis" > < em > NAME< / em > < / span > , < span class = "strong" > < strong > --module-name=< / strong > < / span > < span class = "emphasis" > < em > NAME< / em > < / span >
2012-03-07 17:35:18 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
Execute the module called < span class = "emphasis" > < em > NAME< / em > < / span > .
2012-03-07 17:35:18 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -M< / strong > < / span > < span class = "emphasis" > < em > DIRECTORY< / em > < / span > , < span class = "strong" > < strong > --module-path=< / strong > < / span > < span class = "emphasis" > < em > DIRECTORY< / em > < / span >
2012-03-07 17:35:18 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
The < span class = "emphasis" > < em > DIRECTORY< / em > < / span > to load modules from. The default is < span class = "emphasis" > < em > /usr/share/ansible< / em > < / span > .
2012-03-10 04:11:41 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -a< / strong > < / span > '< span class = "emphasis" > < em > ARGUMENTS< / em > < / span > ', < span class = "strong" > < strong > --args=< / strong > < / span > '< span class = "emphasis" > < em > ARGUMENTS< / em > < / span > '
2012-03-10 04:11:41 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
The < span class = "emphasis" > < em > ARGUMENTS< / em > < / span > to pass to the module.
2012-03-10 04:11:41 +01:00
< / dd > < dt > < span class = "term" >
< span class = "strong" > < strong > -k< / strong > < / span > , < span class = "strong" > < strong > --ask-pass< / strong > < / span >
< / span > < / dt > < dd >
Prompt for the SSH password instead of assuming key-based authentication with ssh-agent.
< / dd > < dt > < span class = "term" >
< span class = "strong" > < strong > -o< / strong > < / span > , < span class = "strong" > < strong > --one-line< / strong > < / span >
< / span > < / dt > < dd >
Try to output everything on one line.
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -t< / strong > < / span > < span class = "emphasis" > < em > DIRECTORY< / em > < / span > , < span class = "strong" > < strong > --tree=< / strong > < / span > < span class = "emphasis" > < em > DIRECTORY< / em > < / span >
2012-03-10 04:11:41 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
Save contents in this output < span class = "emphasis" > < em > DIRECTORY< / em > < / span > , with the results saved in a
file named after each host.
2012-03-10 04:11:41 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -T< / strong > < / span > < span class = "emphasis" > < em > SECONDS< / em > < / span > , < span class = "strong" > < strong > --timeout=< / strong > < / span > < span class = "emphasis" > < em > SECONDS< / em > < / span >
2012-03-10 04:11:41 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
Connection timeout to use when trying to talk to hosts, in < span class = "emphasis" > < em > SECONDS< / em > < / span > .
2012-03-10 04:11:41 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -B< / strong > < / span > < span class = "emphasis" > < em > NUM< / em > < / span > , < span class = "strong" > < strong > --background=< / strong > < / span > < span class = "emphasis" > < em > NUM< / em > < / span >
2012-03-10 04:11:41 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
Run commands in the background, killing the task after < span class = "emphasis" > < em > NUM< / em > < / span > seconds.
2012-03-10 04:11:41 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -P< / strong > < / span > < span class = "emphasis" > < em > NUM< / em > < / span > , < span class = "strong" > < strong > --poll=< / strong > < / span > < span class = "emphasis" > < em > NUM< / em > < / span >
2012-03-12 02:09:21 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
Poll a background job every < span class = "emphasis" > < em > NUM< / em > < / span > seconds. Requires < span class = "strong" > < strong > -B< / strong > < / span > .
2012-03-12 02:09:21 +01:00
< / dd > < dt > < span class = "term" >
2012-03-24 03:38:29 +01:00
< span class = "strong" > < strong > -u< / strong > < / span > < span class = "emphasis" > < em > USERNAME< / em > < / span > , < span class = "strong" > < strong > --remote-user=< / strong > < / span > < span class = "emphasis" > < em > USERNAME< / em > < / span >
2012-03-10 04:11:41 +01:00
< / span > < / dt > < dd >
2012-03-24 03:38:29 +01:00
Use this remote < span class = "emphasis" > < em > USERNAME< / em > < / span > instead of root.
2012-03-10 04:11:41 +01:00
< / dd > < / dl > < / div > < / div > < div class = "refsect1" title = "INVENTORY" > < a id = "_inventory" > < / a > < h2 > INVENTORY< / h2 > < p > Ansible stores the hosts it can potentially operate on in an inventory
2012-03-07 17:35:18 +01:00
file. The syntax is one host per line. Groups headers are allowed and
2012-03-10 04:11:41 +01:00
are included on their own line, enclosed in square brackets.< / p > < / div > < div class = "refsect1" title = "FILES" > < a id = "_files" > < / a > < h2 > FILES< / h2 > < p > /etc/ansible/hosts — Default inventory file< / p > < p > /usr/share/ansible/ — Default module library< / p > < / div > < div class = "refsect1" title = "ENVIRONMENT" > < a id = "_environment" > < / a > < h2 > ENVIRONMENT< / h2 > < p > The following environment variables may specified.< / p > < p > ANSIBLE_HOSTS — Override the default ansible hosts file< / p > < p > ANSIBLE_LIBRARY — Override the default ansible module library path< / p > < / div > < div class = "refsect1" title = "AUTHOR" > < a id = "_author" > < / a > < h2 > AUTHOR< / h2 > < p > Ansible was originally written by Michael DeHaan. See the AUTHORS file
2012-03-12 02:09:21 +01:00
for a complete list of contributors.< / p > < / div > < div class = "refsect1" title = "COPYRIGHT" > < a id = "_copyright" > < / a > < h2 > COPYRIGHT< / h2 > < p > Copyright © 2012, Michael DeHaan< / p > < p > Ansible is released under the terms of the GPLv3 License.< / p > < / div > < div class = "refsect1" title = "SEE ALSO" > < a id = "_see_also" > < / a > < h2 > SEE ALSO< / h2 > < p > < span class = "strong" > < strong > ansible-playbook< / strong > < / span > (1)< / p > < p > Extensive documentation as well as IRC and mailing list info
2012-03-10 04:11:41 +01:00
is available on the ansible home page: < a class = "ulink" href = "https://ansible.github.com/" target = "_top" > https://ansible.github.com/< / a > < / p > < / div > < / div > < / body > < / html >