diff --git a/html/YAMLScripts.html b/html/YAMLScripts.html index f252982648e..b1a23d87da7 100644 --- a/html/YAMLScripts.html +++ b/html/YAMLScripts.html @@ -23,7 +23,7 @@ <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Ansible v0.0.1 documentation" href="index.html" /> - <link rel="next" title="Playbooks" href="playbooks.html" /> + <link rel="next" title="Playbooks: Ansible for Deployment, Configuration Management, and Orchestration" href="playbooks.html" /> <link rel="prev" title="Ansible Modules" href="modules.html" /> </head> <body> @@ -34,7 +34,7 @@ <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > - <a href="playbooks.html" title="Playbooks" + <a href="playbooks.html" title="Playbooks: Ansible for Deployment, Configuration Management, and Orchestration" accesskey="N">next</a> |</li> <li class="right" > <a href="modules.html" title="Ansible Modules" @@ -143,7 +143,7 @@ languages: title="previous chapter">Ansible Modules</a></p> <h4>Next topic</h4> <p class="topless"><a href="playbooks.html" - title="next chapter">Playbooks</a></p> + title="next chapter">Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/YAMLScripts.txt" @@ -173,7 +173,7 @@ languages: <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > - <a href="playbooks.html" title="Playbooks" + <a href="playbooks.html" title="Playbooks: Ansible for Deployment, Configuration Management, and Orchestration" >next</a> |</li> <li class="right" > <a href="modules.html" title="Ansible Modules" diff --git a/html/_sources/index.txt b/html/_sources/index.txt index 4ab721e4e24..90a826a12c4 100644 --- a/html/_sources/index.txt +++ b/html/_sources/index.txt @@ -48,6 +48,16 @@ to orchestrate systems in lots of diverse places. Ansible is an GPLv3 licensed open source project, so see the contributions section for how to get involved. +Communicate and Get Involved +```````````````````````````` + +* Join the `ansible-project mailing list <http://groups.google.com/group/ansible-project>`_ on Google Groups +* Join `#ansible <irc://irc.freenode.net/#ansible>`_ on the `freenode IRC network <http://freenode.net/>`_ +* Visit the `project page <https://github.com/ansible/ansible>`_ on Github + + - View the `issue tracker <https://github.com/ansible/ansible/issues>`_ + + Contents ======== @@ -61,5 +71,4 @@ Contents playbooks examples api - communicate man diff --git a/html/_sources/modules.txt b/html/_sources/modules.txt index 540aad2bf7d..b17d5044481 100644 --- a/html/_sources/modules.txt +++ b/html/_sources/modules.txt @@ -1,6 +1,9 @@ Ansible Modules =============== +Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible playbooks. + .. seealso:: :doc:`examples` @@ -10,16 +13,8 @@ Ansible Modules :doc:`api` Examples of using modules with the Python API - -About Modules -````````````` - -Ansible ships with a number of modules that can be executed directly on remote hosts or through -ansible playbooks. - - -Idempotence -``````````` +Module Idempotence +``````````````````` Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can @@ -189,7 +184,7 @@ yum This module is in plan. -WRITING YOUR OWN MODULES +writing your own modules ```````````````````````` To write your own modules, simply follow the convention of those already available in diff --git a/html/_sources/patterns.txt b/html/_sources/patterns.txt index 6b73114199e..8ef369b225c 100644 --- a/html/_sources/patterns.txt +++ b/html/_sources/patterns.txt @@ -1,5 +1,5 @@ -Patterns -======== +The Inventory File, Patterns, and Groups +======================================== How to select hosts you wish to manage @@ -10,6 +10,9 @@ How to select hosts you wish to manage :doc:`playbooks` Learning ansible's configuration management language +Inventory File Format ++++++++++++++++++++++ + Ansible works against multiple systems in your infrastructure at the same time. It does this by selecting portions of systems listed in Ansible's inventory file, which defaults to /etc/ansible/hosts, and looks like this:: @@ -25,45 +28,36 @@ which defaults to /etc/ansible/hosts, and looks like this:: two.example.com three.example.com -Targetting All Systems -`````````````````````` -The pattern 'all' or '*' targets all systems in the inventory file. - -Specific Hosts -`````````````` +Selecting Targets ++++++++++++++++++ -It is possible to address specific hosts: +These patterns target all hosts in the inventory file:: + + all + * + +It is also possible to address specific hosts:: one.example.com one.example.com:two.example.com -Groups -`````` -The following patterns address one or more groups: +The following patterns address one or more groups, which are denoted with the bracket +headers in the inventory file:: webservers webservers:dbservers -There is also a magic group 'ungrouped' which selects systems not in a group. - -Wildcards -````````` - Individual hosts, but not groups, can also be referenced using wildcards: *.example.com *.com -Mixing Things Up -```````````````` - -Specific hosts, wildcards, and groups can all be mixed in the same pattern +It's also ok to mix wildcard patterns and groups at the same time:: one*.com:dbservers -It is not possible to target a host not in the inventory file. - +NOTE: It is not possible to target a host not in the inventory file. diff --git a/html/_sources/playbooks.txt b/html/_sources/playbooks.txt index 065005b94e8..fb23c4cf0ab 100644 --- a/html/_sources/playbooks.txt +++ b/html/_sources/playbooks.txt @@ -1,5 +1,5 @@ -Playbooks -========= +Playbooks: Ansible for Deployment, Configuration Management, and Orchestration +============================================================================== .. seealso:: @@ -11,72 +11,71 @@ Playbooks Learn about how to select hosts -Playbooks are a completely different way to use ansible and are particularly awesome. - -They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec. +Playbooks are a completely different way to use ansible and are particularly awesome. They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec. Playbook Example ```````````````` Playbooks are expressed in YAML format and have a minimum of syntax. Each playbook is composed -of one or more patterns in a list. By composing a playbook of multiple patterns, it is possible +of one or more 'plays' in a list. By composing a playbook of multiple 'plays', it is possible to orchestrate multi-machine deployments, running certain steps on all machines in the webservers group, then certain steps on the database server group, then more commands back on the webservers group, etc:: ---- -- hosts: all - vars: - http_port: 80 - max_clients: 200 - user: root - tasks: - - include: base.yml somevar=3 othervar=4 - - name: write the apache config file - action: template src=/srv/httpd.j2 dest=/etc/httpd.conf - notify: - - restart apache - - name: ensure apache is running - action: service name=httpd state=started - handlers: - - include: handlers.yml + --- + - hosts: webservers + vars: + http_port: 80 + max_clients: 200 + user: root + tasks: + - include: base.yml somevar=3 othervar=4 + - name: write the apache config file + action: template src=/srv/httpd.j2 dest=/etc/httpd.conf + notify: + - restart apache + - name: ensure apache is running + action: service name=httpd state=started + handlers: + - include: handlers.yml Hosts line `````````` -The hosts line is alist of one or more groups or host patterns, seperated by colons. - - webservers:dbservers:*.foo.example.com +The hosts line is alist of one or more groups or host patterns, seperated by colons, as +described in the 'patterns' documentation. Vars section ```````````` -A list of variables that can be used in the 'action' lines of the template, or in -included templates. Variables are deferenced like this:: +A list of variables that can be used in the templates, action lines, or included files. +Variables are deferenced using ``jinja2`` syntax like this:: {{ varname }} -These variables will be pushed down to the managed systems for use in templating operations. +These variables will be pushed down to the managed systems for use in templating operations, where +the way to dereference them in templates is exactly the same. Further, if there are discovered variables about the system (say, if facter or ohai were installed) these variables bubble up back into the playbook, and can be used on each -system just like explicitly set variables. Facter variables are prefixed with 'facter' -and Ohai variables are prefixed with 'ohai'. +system just like explicitly set variables. Facter variables are prefixed with 'facter_' +and Ohai variables are prefixed with 'ohai_'. Tasks list `````````` -Tasks are executed in order, one at a time, against all machines matched by the host -pattern, before moving on to the next task. Failed tasks are taken out of the rotation. +Each play contains a list of tasks. Tasks are executed in order, one at a time, against +all machines matched by the play's host pattern, before moving on to the next task. +Hosts with failed tasks are taken out of the rotation for the entire playbook. If things fail, +correct the problem and rerun. Modules other than command are idempotent, meaning if you +run them again, they will make the changes they are told to make to bring the system to +the desired state. -Task name and comment -````````` +Task name and action +````````````````````` -Each task has a name (required) and optional comment. This is for informational purposes only - -Task action -``````````` +Every task must have a name, which is included in the output from running the playbook. The action line is the name of an ansible module followed by parameters. Usually these are expressed in key=value form, except for the command module, which looks just like a Linux/Unix diff --git a/html/api.html b/html/api.html index 92aa0ccbf7f..1f5a3af6cc8 100644 --- a/html/api.html +++ b/html/api.html @@ -23,7 +23,7 @@ <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Ansible v0.0.1 documentation" href="index.html" /> - <link rel="next" title="Communicate and Get Involved" href="communicate.html" /> + <link rel="next" title="Man Pages" href="man.html" /> <link rel="prev" title="Examples" href="examples.html" /> </head> <body> @@ -34,7 +34,7 @@ <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > - <a href="communicate.html" title="Communicate and Get Involved" + <a href="man.html" title="Man Pages" accesskey="N">next</a> |</li> <li class="right" > <a href="examples.html" title="Examples" @@ -90,8 +90,8 @@ be used as a framework to rapidly build powerful applications and scripts.</p> <p class="topless"><a href="examples.html" title="previous chapter">Examples</a></p> <h4>Next topic</h4> - <p class="topless"><a href="communicate.html" - title="next chapter">Communicate and Get Involved</a></p> + <p class="topless"><a href="man.html" + title="next chapter">Man Pages</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/api.txt" @@ -121,7 +121,7 @@ be used as a framework to rapidly build powerful applications and scripts.</p> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > - <a href="communicate.html" title="Communicate and Get Involved" + <a href="man.html" title="Man Pages" >next</a> |</li> <li class="right" > <a href="examples.html" title="Examples" diff --git a/html/examples.html b/html/examples.html index ad455dd3e95..b16e78e7a98 100644 --- a/html/examples.html +++ b/html/examples.html @@ -24,7 +24,7 @@ <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Ansible v0.0.1 documentation" href="index.html" /> <link rel="next" title="API" href="api.html" /> - <link rel="prev" title="Playbooks" href="playbooks.html" /> + <link rel="prev" title="Playbooks: Ansible for Deployment, Configuration Management, and Orchestration" href="playbooks.html" /> </head> <body> <div class="related"> @@ -37,7 +37,7 @@ <a href="api.html" title="API" accesskey="N">next</a> |</li> <li class="right" > - <a href="playbooks.html" title="Playbooks" + <a href="playbooks.html" title="Playbooks: Ansible for Deployment, Configuration Management, and Orchestration" accesskey="P">previous</a> |</li> <li><a href="index.html">Ansible v0.0.1 documentation</a> »</li> </ul> @@ -55,7 +55,7 @@ <dl class="last docutils"> <dt><a class="reference internal" href="modules.html"><em>Ansible Modules</em></a></dt> <dd>A list of available modules</dd> -<dt><a class="reference internal" href="playbooks.html"><em>Playbooks</em></a></dt> +<dt><a class="reference internal" href="playbooks.html"><em>Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</em></a></dt> <dd>Alternative ways to use ansible</dd> </dl> </div> @@ -119,7 +119,7 @@ ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"</pre> <h4>Previous topic</h4> <p class="topless"><a href="playbooks.html" - title="previous chapter">Playbooks</a></p> + title="previous chapter">Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</a></p> <h4>Next topic</h4> <p class="topless"><a href="api.html" title="next chapter">API</a></p> @@ -155,7 +155,7 @@ ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"</pre> <a href="api.html" title="API" >next</a> |</li> <li class="right" > - <a href="playbooks.html" title="Playbooks" + <a href="playbooks.html" title="Playbooks: Ansible for Deployment, Configuration Management, and Orchestration" >previous</a> |</li> <li><a href="index.html">Ansible v0.0.1 documentation</a> »</li> </ul> diff --git a/html/gettingstarted.html b/html/gettingstarted.html index 6b2e0498a09..a2b3d6a130e 100644 --- a/html/gettingstarted.html +++ b/html/gettingstarted.html @@ -23,7 +23,7 @@ <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Ansible v0.0.1 documentation" href="index.html" /> - <link rel="next" title="Patterns" href="patterns.html" /> + <link rel="next" title="The Inventory File, Patterns, and Groups" href="patterns.html" /> <link rel="prev" title="Ansible" href="index.html" /> </head> <body> @@ -34,7 +34,7 @@ <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > - <a href="patterns.html" title="Patterns" + <a href="patterns.html" title="The Inventory File, Patterns, and Groups" accesskey="N">next</a> |</li> <li class="right" > <a href="index.html" title="Ansible" @@ -58,7 +58,7 @@ <dd>Examples of basic commands</dd> <dt><a class="reference internal" href="YAMLScripts.html"><em>YAML Scripts</em></a></dt> <dd>Complete documentation of the YAML syntax <cite>ansible</cite> understands for playbooks.</dd> -<dt><a class="reference internal" href="playbooks.html"><em>Playbooks</em></a></dt> +<dt><a class="reference internal" href="playbooks.html"><em>Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</em></a></dt> <dd>Learning ansible’s configuration management language</dd> <dt><a class="reference internal" href="modules.html"><em>Ansible Modules</em></a></dt> <dd>Learn about modules that ship with ansible</dd> @@ -167,7 +167,7 @@ of the more real-world examples.</p> title="previous chapter">Ansible</a></p> <h4>Next topic</h4> <p class="topless"><a href="patterns.html" - title="next chapter">Patterns</a></p> + title="next chapter">The Inventory File, Patterns, and Groups</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/gettingstarted.txt" @@ -197,7 +197,7 @@ of the more real-world examples.</p> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > - <a href="patterns.html" title="Patterns" + <a href="patterns.html" title="The Inventory File, Patterns, and Groups" >next</a> |</li> <li class="right" > <a href="index.html" title="Ansible" diff --git a/html/index.html b/html/index.html index e03ff09afe0..d4191db7b6c 100644 --- a/html/index.html +++ b/html/index.html @@ -83,6 +83,17 @@ to orchestrate systems in lots of diverse places.</p> <p>Ansible is an GPLv3 licensed open source project, so see the contributions section for how to get involved.</p> </div> +<div class="section" id="communicate-and-get-involved"> +<h2>Communicate and Get Involved<a class="headerlink" href="#communicate-and-get-involved" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>Join the <a class="reference external" href="http://groups.google.com/group/ansible-project">ansible-project mailing list</a> on Google Groups</li> +<li>Join <a class="reference external" href="irc://irc.freenode.net/#ansible">#ansible</a> on the <a class="reference external" href="http://freenode.net/">freenode IRC network</a></li> +<li>Visit the <a class="reference external" href="https://github.com/ansible/ansible">project page</a> on Github<ul> +<li>View the <a class="reference external" href="https://github.com/ansible/ansible/issues">issue tracker</a></li> +</ul> +</li> +</ul> +</div> </div> <div class="section" id="contents"> <h1>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h1> @@ -99,17 +110,13 @@ get involved.</p> <li class="toctree-l2"><a class="reference internal" href="gettingstarted.html#your-first-commands">Your first commands</a></li> </ul> </li> -<li class="toctree-l1"><a class="reference internal" href="patterns.html">Patterns</a><ul> -<li class="toctree-l2"><a class="reference internal" href="patterns.html#targetting-all-systems">Targetting All Systems</a></li> -<li class="toctree-l2"><a class="reference internal" href="patterns.html#specific-hosts">Specific Hosts</a></li> -<li class="toctree-l2"><a class="reference internal" href="patterns.html#groups">Groups</a></li> -<li class="toctree-l2"><a class="reference internal" href="patterns.html#wildcards">Wildcards</a></li> -<li class="toctree-l2"><a class="reference internal" href="patterns.html#mixing-things-up">Mixing Things Up</a></li> +<li class="toctree-l1"><a class="reference internal" href="patterns.html">The Inventory File, Patterns, and Groups</a><ul> +<li class="toctree-l2"><a class="reference internal" href="patterns.html#inventory-file-format">Inventory File Format</a></li> +<li class="toctree-l2"><a class="reference internal" href="patterns.html#selecting-targets">Selecting Targets</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="modules.html">Ansible Modules</a><ul> -<li class="toctree-l2"><a class="reference internal" href="modules.html#about-modules">About Modules</a></li> -<li class="toctree-l2"><a class="reference internal" href="modules.html#idempotence">Idempotence</a></li> +<li class="toctree-l2"><a class="reference internal" href="modules.html#module-idempotence">Module Idempotence</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#command">command</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#copy">copy</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#facter">facter</a></li> @@ -121,20 +128,19 @@ get involved.</p> <li class="toctree-l2"><a class="reference internal" href="modules.html#template">template</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#user">user</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#yum">yum</a></li> -<li class="toctree-l2"><a class="reference internal" href="modules.html#writing-your-own-modules">WRITING YOUR OWN MODULES</a></li> +<li class="toctree-l2"><a class="reference internal" href="modules.html#writing-your-own-modules">writing your own modules</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="YAMLScripts.html">YAML Scripts</a><ul> <li class="toctree-l2"><a class="reference internal" href="YAMLScripts.html#yaml-basics">YAML Basics</a></li> </ul> </li> -<li class="toctree-l1"><a class="reference internal" href="playbooks.html">Playbooks</a><ul> +<li class="toctree-l1"><a class="reference internal" href="playbooks.html">Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</a><ul> <li class="toctree-l2"><a class="reference internal" href="playbooks.html#playbook-example">Playbook Example</a></li> <li class="toctree-l2"><a class="reference internal" href="playbooks.html#hosts-line">Hosts line</a></li> <li class="toctree-l2"><a class="reference internal" href="playbooks.html#vars-section">Vars section</a></li> <li class="toctree-l2"><a class="reference internal" href="playbooks.html#tasks-list">Tasks list</a></li> -<li class="toctree-l2"><a class="reference internal" href="playbooks.html#task-name-and-comment">Task name and comment</a></li> -<li class="toctree-l2"><a class="reference internal" href="playbooks.html#task-action">Task action</a></li> +<li class="toctree-l2"><a class="reference internal" href="playbooks.html#task-name-and-action">Task name and action</a></li> <li class="toctree-l2"><a class="reference internal" href="playbooks.html#notify-statements">Notify statements</a></li> <li class="toctree-l2"><a class="reference internal" href="playbooks.html#handlers">Handlers</a></li> <li class="toctree-l2"><a class="reference internal" href="playbooks.html#includes">Includes</a></li> @@ -150,7 +156,6 @@ get involved.</p> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="api.html">API</a></li> -<li class="toctree-l1"><a class="reference internal" href="communicate.html">Communicate and Get Involved</a></li> <li class="toctree-l1"><a class="reference internal" href="man.html">Man Pages</a><ul> <li class="toctree-l2"><a class="reference internal" href="man.html#ansible-1">ansible(1)</a></li> </ul> @@ -170,6 +175,7 @@ get involved.</p> <li><a class="reference internal" href="#">Ansible</a><ul> <li><a class="reference internal" href="#design-goals">Design Goals</a></li> <li><a class="reference internal" href="#about-the-author">About the Author</a></li> +<li><a class="reference internal" href="#communicate-and-get-involved">Communicate and Get Involved</a></li> </ul> </li> <li><a class="reference internal" href="#contents">Contents</a><ul> diff --git a/html/man.html b/html/man.html index 36b4cf1bdd4..0aeea7c3bb5 100644 --- a/html/man.html +++ b/html/man.html @@ -23,7 +23,7 @@ <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Ansible v0.0.1 documentation" href="index.html" /> - <link rel="prev" title="Communicate and Get Involved" href="communicate.html" /> + <link rel="prev" title="API" href="api.html" /> </head> <body> <div class="related"> @@ -33,7 +33,7 @@ <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > - <a href="communicate.html" title="Communicate and Get Involved" + <a href="api.html" title="API" accesskey="P">previous</a> |</li> <li><a href="index.html">Ansible v0.0.1 documentation</a> »</li> </ul> @@ -70,8 +70,8 @@ </ul> <h4>Previous topic</h4> - <p class="topless"><a href="communicate.html" - title="previous chapter">Communicate and Get Involved</a></p> + <p class="topless"><a href="api.html" + title="previous chapter">API</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/man.txt" @@ -101,7 +101,7 @@ <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > - <a href="communicate.html" title="Communicate and Get Involved" + <a href="api.html" title="API" >previous</a> |</li> <li><a href="index.html">Ansible v0.0.1 documentation</a> »</li> </ul> diff --git a/html/man/ansible-modules.5.html b/html/man/ansible-modules.5.html index e9f992b290e..c837ce113e6 100644 --- a/html/man/ansible-modules.5.html +++ b/html/man/ansible-modules.5.html @@ -1,6 +1,6 @@ <?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"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ansible-modules</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-modules" lang="en"><a id="id326412"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-modules — stock modules shipped with ansible</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p>Ansible ships with a number of modules that can be executed directly on remote hosts or through +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ansible-modules</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-modules" lang="en"><a id="id372014"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-modules — stock modules shipped with ansible</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p>Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks.</p></div><div class="refsect1" title="IDEMPOTENCE"><a id="_idempotence"></a><h2>IDEMPOTENCE</h2><p>Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events, as described in <span class="strong"><strong>ansible-playbooks</strong></span>(5).</p><p>Unless otherwise noted, all modules support change hooks.</p></div><div class="refsect1" title="command"><a id="_command"></a><h2>command</h2><p>The command module takes the command name followed by a list of arguments, space delimited. diff --git a/html/man/ansible-playbook.5.html b/html/man/ansible-playbook.5.html index ad1d534af30..3494597ed54 100644 --- a/html/man/ansible-playbook.5.html +++ b/html/man/ansible-playbook.5.html @@ -1,6 +1,6 @@ <?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"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ansible-modules</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-modules" lang="en"><a id="id532031"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-playbook — format and function of an ansible playbook file</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p>Ansible ships with <span class="emphasis"><em>ansible-playbook</em></span>, a tool for running playbooks. +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ansible-modules</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-modules" lang="en"><a id="id447346"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-playbook — format and function of an ansible playbook file</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p>Ansible ships with <span class="emphasis"><em>ansible-playbook</em></span>, a tool for running playbooks. Playbooks can represent frequent tasks, desired system configurations, or deployment processes.</p></div><div class="refsect1" title="FORMAT"><a id="_format"></a><h2>FORMAT</h2><p>Playbooks are written in YAML.</p></div><div class="refsect1" title="EXAMPLE"><a id="_example"></a><h2>EXAMPLE</h2><p>See:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> <a class="ulink" href="https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml" target="_top">https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml</a> diff --git a/html/man/ansible.1.html b/html/man/ansible.1.html index ba76d1444f1..94b28796983 100644 --- a/html/man/ansible.1.html +++ b/html/man/ansible.1.html @@ -1,6 +1,6 @@ <?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"> -<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="id320915"></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 +<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="id490114"></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 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> diff --git a/html/modules.html b/html/modules.html index 7c2a1569016..9744dfea548 100644 --- a/html/modules.html +++ b/html/modules.html @@ -24,7 +24,7 @@ <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Ansible v0.0.1 documentation" href="index.html" /> <link rel="next" title="YAML Scripts" href="YAMLScripts.html" /> - <link rel="prev" title="Patterns" href="patterns.html" /> + <link rel="prev" title="The Inventory File, Patterns, and Groups" href="patterns.html" /> </head> <body> <div class="related"> @@ -37,7 +37,7 @@ <a href="YAMLScripts.html" title="YAML Scripts" accesskey="N">next</a> |</li> <li class="right" > - <a href="patterns.html" title="Patterns" + <a href="patterns.html" title="The Inventory File, Patterns, and Groups" accesskey="P">previous</a> |</li> <li><a href="index.html">Ansible v0.0.1 documentation</a> »</li> </ul> @@ -50,24 +50,21 @@ <div class="section" id="ansible-modules"> <h1>Ansible Modules<a class="headerlink" href="#ansible-modules" title="Permalink to this headline">¶</a></h1> +<p>Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible playbooks.</p> <div class="admonition-see-also admonition seealso"> <p class="first admonition-title">See also</p> <dl class="last docutils"> <dt><a class="reference internal" href="examples.html"><em>Examples</em></a></dt> <dd>Examples of using modules in /usr/bin/ansible</dd> -<dt><a class="reference internal" href="playbooks.html"><em>Playbooks</em></a></dt> +<dt><a class="reference internal" href="playbooks.html"><em>Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</em></a></dt> <dd>Examples of using modules with /usr/bin/ansible-playbook</dd> <dt><a class="reference internal" href="api.html"><em>API</em></a></dt> <dd>Examples of using modules with the Python API</dd> </dl> </div> -<div class="section" id="about-modules"> -<h2>About Modules<a class="headerlink" href="#about-modules" title="Permalink to this headline">¶</a></h2> -<p>Ansible ships with a number of modules that can be executed directly on remote hosts or through -ansible playbooks.</p> -</div> -<div class="section" id="idempotence"> -<h2>Idempotence<a class="headerlink" href="#idempotence" title="Permalink to this headline">¶</a></h2> +<div class="section" id="module-idempotence"> +<h2>Module Idempotence<a class="headerlink" href="#module-idempotence" title="Permalink to this headline">¶</a></h2> <p>Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events. Unless otherwise noted, all modules support change hooks.</p> @@ -172,7 +169,7 @@ remote user who does not have permissions on /etc/ansible.</p> <p>This module is in plan.</p> </div> <div class="section" id="writing-your-own-modules"> -<h2>WRITING YOUR OWN MODULES<a class="headerlink" href="#writing-your-own-modules" title="Permalink to this headline">¶</a></h2> +<h2>writing your own modules<a class="headerlink" href="#writing-your-own-modules" title="Permalink to this headline">¶</a></h2> <p>To write your own modules, simply follow the convention of those already available in /usr/share/ansible. Modules must return JSON but can be written in any language. Modules should return hashes, but hashes can be nested. @@ -192,8 +189,7 @@ describing the nature of the failure. Other values are up to the module.</p> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Ansible Modules</a><ul> -<li><a class="reference internal" href="#about-modules">About Modules</a></li> -<li><a class="reference internal" href="#idempotence">Idempotence</a></li> +<li><a class="reference internal" href="#module-idempotence">Module Idempotence</a></li> <li><a class="reference internal" href="#command">command</a></li> <li><a class="reference internal" href="#copy">copy</a></li> <li><a class="reference internal" href="#facter">facter</a></li> @@ -205,14 +201,14 @@ describing the nature of the failure. Other values are up to the module.</p> <li><a class="reference internal" href="#template">template</a></li> <li><a class="reference internal" href="#user">user</a></li> <li><a class="reference internal" href="#yum">yum</a></li> -<li><a class="reference internal" href="#writing-your-own-modules">WRITING YOUR OWN MODULES</a></li> +<li><a class="reference internal" href="#writing-your-own-modules">writing your own modules</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="patterns.html" - title="previous chapter">Patterns</a></p> + title="previous chapter">The Inventory File, Patterns, and Groups</a></p> <h4>Next topic</h4> <p class="topless"><a href="YAMLScripts.html" title="next chapter">YAML Scripts</a></p> @@ -248,7 +244,7 @@ describing the nature of the failure. Other values are up to the module.</p> <a href="YAMLScripts.html" title="YAML Scripts" >next</a> |</li> <li class="right" > - <a href="patterns.html" title="Patterns" + <a href="patterns.html" title="The Inventory File, Patterns, and Groups" >previous</a> |</li> <li><a href="index.html">Ansible v0.0.1 documentation</a> »</li> </ul> diff --git a/html/patterns.html b/html/patterns.html index b421d63923b..9ea3280552a 100644 --- a/html/patterns.html +++ b/html/patterns.html @@ -7,7 +7,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Patterns — Ansible v0.0.1 documentation</title> + <title>The Inventory File, Patterns, and Groups — Ansible v0.0.1 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> @@ -48,18 +48,20 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="patterns"> -<h1>Patterns<a class="headerlink" href="#patterns" title="Permalink to this headline">¶</a></h1> + <div class="section" id="the-inventory-file-patterns-and-groups"> +<h1>The Inventory File, Patterns, and Groups<a class="headerlink" href="#the-inventory-file-patterns-and-groups" title="Permalink to this headline">¶</a></h1> <p>How to select hosts you wish to manage</p> <div class="admonition-see-also admonition seealso"> <p class="first admonition-title">See also</p> <dl class="last docutils"> <dt><a class="reference internal" href="examples.html"><em>Examples</em></a></dt> <dd>Examples of basic commands</dd> -<dt><a class="reference internal" href="playbooks.html"><em>Playbooks</em></a></dt> +<dt><a class="reference internal" href="playbooks.html"><em>Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</em></a></dt> <dd>Learning ansible’s configuration management language</dd> </dl> </div> +<div class="section" id="inventory-file-format"> +<h2>Inventory File Format<a class="headerlink" href="#inventory-file-format" title="Permalink to this headline">¶</a></h2> <p>Ansible works against multiple systems in your infrastructure at the same time. It does this by selecting portions of systems listed in Ansible’s inventory file, which defaults to /etc/ansible/hosts, and looks like this:</p> @@ -75,38 +77,30 @@ which defaults to /etc/ansible/hosts, and looks like this:</p> <span class="n">three</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span> </pre></div> </div> -<div class="section" id="targetting-all-systems"> -<h2>Targetting All Systems<a class="headerlink" href="#targetting-all-systems" title="Permalink to this headline">¶</a></h2> -<p>The pattern ‘all’ or ‘*’ targets all systems in the inventory file.</p> </div> -<div class="section" id="specific-hosts"> -<h2>Specific Hosts<a class="headerlink" href="#specific-hosts" title="Permalink to this headline">¶</a></h2> -<p>It is possible to address specific hosts:</p> -<blockquote> -<div>one.example.com -one.example.com:two.example.com</div></blockquote> +<div class="section" id="selecting-targets"> +<h2>Selecting Targets<a class="headerlink" href="#selecting-targets" title="Permalink to this headline">¶</a></h2> +<p>These patterns target all hosts in the inventory file:</p> +<div class="highlight-python"><pre>all +*</pre> </div> -<div class="section" id="groups"> -<h2>Groups<a class="headerlink" href="#groups" title="Permalink to this headline">¶</a></h2> -<p>The following patterns address one or more groups:</p> -<blockquote> -<div>webservers -webservers:dbservers</div></blockquote> -<p>There is also a magic group ‘ungrouped’ which selects systems not in a group.</p> +<p>It is also possible to address specific hosts:</p> +<div class="highlight-python"><pre>one.example.com +one.example.com:two.example.com</pre> +</div> +<p>The following patterns address one or more groups, which are denoted with the bracket +headers in the inventory file:</p> +<div class="highlight-python"><pre>webservers +webservers:dbservers</pre> </div> -<div class="section" id="wildcards"> -<h2>Wildcards<a class="headerlink" href="#wildcards" title="Permalink to this headline">¶</a></h2> <p>Individual hosts, but not groups, can also be referenced using wildcards:</p> <blockquote> <div><a href="#id1"><span class="problematic" id="id2">*</span></a>.example.com <a href="#id3"><span class="problematic" id="id4">*</span></a>.com</div></blockquote> +<p>It’s also ok to mix wildcard patterns and groups at the same time:</p> +<div class="highlight-python"><pre>one*.com:dbservers</pre> </div> -<div class="section" id="mixing-things-up"> -<h2>Mixing Things Up<a class="headerlink" href="#mixing-things-up" title="Permalink to this headline">¶</a></h2> -<p>Specific hosts, wildcards, and groups can all be mixed in the same pattern</p> -<blockquote> -<div>one*.com:dbservers</div></blockquote> -<p>It is not possible to target a host not in the inventory file.</p> +<p>NOTE: It is not possible to target a host not in the inventory file.</p> </div> </div> @@ -118,12 +112,9 @@ webservers:dbservers</div></blockquote> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> -<li><a class="reference internal" href="#">Patterns</a><ul> -<li><a class="reference internal" href="#targetting-all-systems">Targetting All Systems</a></li> -<li><a class="reference internal" href="#specific-hosts">Specific Hosts</a></li> -<li><a class="reference internal" href="#groups">Groups</a></li> -<li><a class="reference internal" href="#wildcards">Wildcards</a></li> -<li><a class="reference internal" href="#mixing-things-up">Mixing Things Up</a></li> +<li><a class="reference internal" href="#">The Inventory File, Patterns, and Groups</a><ul> +<li><a class="reference internal" href="#inventory-file-format">Inventory File Format</a></li> +<li><a class="reference internal" href="#selecting-targets">Selecting Targets</a></li> </ul> </li> </ul> diff --git a/html/playbooks.html b/html/playbooks.html index 57231156664..c6b8e7f29de 100644 --- a/html/playbooks.html +++ b/html/playbooks.html @@ -7,7 +7,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Playbooks — Ansible v0.0.1 documentation</title> + <title>Playbooks: Ansible for Deployment, Configuration Management, and Orchestration — Ansible v0.0.1 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> @@ -48,8 +48,8 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="playbooks"> -<h1>Playbooks<a class="headerlink" href="#playbooks" title="Permalink to this headline">¶</a></h1> + <div class="section" id="playbooks-ansible-for-deployment-configuration-management-and-orchestration"> +<h1>Playbooks: Ansible for Deployment, Configuration Management, and Orchestration<a class="headerlink" href="#playbooks-ansible-for-deployment-configuration-management-and-orchestration" title="Permalink to this headline">¶</a></h1> <div class="admonition-see-also admonition seealso"> <p class="first admonition-title">See also</p> <dl class="last docutils"> @@ -57,78 +57,66 @@ <dd>Learn about YAML syntax</dd> <dt><a class="reference internal" href="modules.html"><em>Ansible Modules</em></a></dt> <dd>Learn about available modules and writing your own</dd> -<dt><a class="reference internal" href="patterns.html"><em>Patterns</em></a></dt> +<dt><a class="reference internal" href="patterns.html"><em>The Inventory File, Patterns, and Groups</em></a></dt> <dd>Learn about how to select hosts</dd> </dl> </div> -<p>Playbooks are a completely different way to use ansible and are particularly awesome.</p> -<p>They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec.</p> +<p>Playbooks are a completely different way to use ansible and are particularly awesome. They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec.</p> <div class="section" id="playbook-example"> <h2>Playbook Example<a class="headerlink" href="#playbook-example" title="Permalink to this headline">¶</a></h2> <p>Playbooks are expressed in YAML format and have a minimum of syntax. Each playbook is composed -of one or more patterns in a list. By composing a playbook of multiple patterns, it is possible +of one or more ‘plays’ in a list. By composing a playbook of multiple ‘plays’, it is possible to orchestrate multi-machine deployments, running certain steps on all machines in the webservers group, then certain steps on the database server group, then more commands back on the webservers group, etc:</p> <div class="highlight-python"><pre>--- -- hosts: all</pre> +- hosts: webservers + vars: + http_port: 80 + max_clients: 200 + user: root + tasks: + - include: base.yml somevar=3 othervar=4 + - name: write the apache config file + action: template src=/srv/httpd.j2 dest=/etc/httpd.conf + notify: + - restart apache + - name: ensure apache is running + action: service name=httpd state=started + handlers: + - include: handlers.yml</pre> </div> -<blockquote> -<div><dl class="docutils"> -<dt>vars:</dt> -<dd>http_port: 80 -max_clients: 200</dd> -</dl> -<p>user: root -tasks: -- include: base.yml somevar=3 othervar=4 -- name: write the apache config file</p> -<blockquote> -<div>action: template src=/srv/httpd.j2 dest=/etc/httpd.conf -notify: -- restart apache</div></blockquote> -<ul class="simple"> -<li>name: ensure apache is running -action: service name=httpd state=started</li> -</ul> -<dl class="docutils"> -<dt>handlers:</dt> -<dd><ul class="first last simple"> -<li>include: handlers.yml</li> -</ul> -</dd> -</dl> -</div></blockquote> </div> <div class="section" id="hosts-line"> <h2>Hosts line<a class="headerlink" href="#hosts-line" title="Permalink to this headline">¶</a></h2> -<p>The hosts line is alist of one or more groups or host patterns, seperated by colons.</p> -<blockquote> -<div>webservers:dbservers:<a href="#id1"><span class="problematic" id="id2">*</span></a>.foo.example.com</div></blockquote> +<p>The hosts line is alist of one or more groups or host patterns, seperated by colons, as +described in the ‘patterns’ documentation.</p> </div> <div class="section" id="vars-section"> <h2>Vars section<a class="headerlink" href="#vars-section" title="Permalink to this headline">¶</a></h2> -<p>A list of variables that can be used in the ‘action’ lines of the template, or in -included templates. Variables are deferenced like this:</p> +<p>A list of variables that can be used in the templates, action lines, or included files. +Variables are deferenced using <tt class="docutils literal"><span class="pre">jinja2</span></tt> syntax like this:</p> <div class="highlight-python"><pre>{{ varname }}</pre> </div> -<p>These variables will be pushed down to the managed systems for use in templating operations.</p> +<p>These variables will be pushed down to the managed systems for use in templating operations, where +the way to dereference them in templates is exactly the same.</p> <p>Further, if there are discovered variables about the system (say, if facter or ohai were installed) these variables bubble up back into the playbook, and can be used on each -system just like explicitly set variables. Facter variables are prefixed with ‘facter’ -and Ohai variables are prefixed with ‘ohai’.</p> +system just like explicitly set variables. Facter variables are prefixed with ‘<a href="#id1"><span class="problematic" id="id2">facter_</span></a>‘ +and Ohai variables are prefixed with ‘<a href="#id3"><span class="problematic" id="id4">ohai_</span></a>‘.</p> </div> <div class="section" id="tasks-list"> <h2>Tasks list<a class="headerlink" href="#tasks-list" title="Permalink to this headline">¶</a></h2> -<p>Tasks are executed in order, one at a time, against all machines matched by the host -pattern, before moving on to the next task. Failed tasks are taken out of the rotation.</p> +<p>Each play contains a list of tasks. Tasks are executed in order, one at a time, against +all machines matched by the play’s host pattern, before moving on to the next task. +Hosts with failed tasks are taken out of the rotation for the entire playbook. If things fail, +correct the problem and rerun. Modules other than command are idempotent, meaning if you +run them again, they will make the changes they are told to make to bring the system to +the desired state.</p> </div> -<div class="section" id="task-name-and-comment"> -<h2>Task name and comment<a class="headerlink" href="#task-name-and-comment" title="Permalink to this headline">¶</a></h2> -<p>Each task has a name (required) and optional comment. This is for informational purposes only</p> -</div> -<div class="section" id="task-action"> -<h2>Task action<a class="headerlink" href="#task-action" title="Permalink to this headline">¶</a></h2> +<div class="section" id="task-name-and-action"> +<h2>Task name and action<a class="headerlink" href="#task-name-and-action" title="Permalink to this headline">¶</a></h2> +<p>Every task must have a name, which is included in the output from running the playbook.</p> <p>The action line is the name of an ansible module followed by parameters. Usually these are expressed in key=value form, except for the command module, which looks just like a Linux/Unix command line. See the module documentation for more info.</p> @@ -172,13 +160,12 @@ Variables passed in can be deferenced like this:</p> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> -<li><a class="reference internal" href="#">Playbooks</a><ul> +<li><a class="reference internal" href="#">Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</a><ul> <li><a class="reference internal" href="#playbook-example">Playbook Example</a></li> <li><a class="reference internal" href="#hosts-line">Hosts line</a></li> <li><a class="reference internal" href="#vars-section">Vars section</a></li> <li><a class="reference internal" href="#tasks-list">Tasks list</a></li> -<li><a class="reference internal" href="#task-name-and-comment">Task name and comment</a></li> -<li><a class="reference internal" href="#task-action">Task action</a></li> +<li><a class="reference internal" href="#task-name-and-action">Task name and action</a></li> <li><a class="reference internal" href="#notify-statements">Notify statements</a></li> <li><a class="reference internal" href="#handlers">Handlers</a></li> <li><a class="reference internal" href="#includes">Includes</a></li> diff --git a/html/searchindex.js b/html/searchindex.js index 418bbdb16db..6e83c8461d9 100644 --- a/html/searchindex.js +++ b/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{all:[0,1,2,4,5,6,8],code:[1,2,8],donec:[],mcollect:1,prefix:[2,4,8],rhoncu:[],lacu:[],follow:[6,2,4],scp:8,nunc:[],bubbl:4,depend:2,fusc:[],program:[1,2,4],certain:4,vel:[],blindingli:1,spec:4,sourc:[1,2,4,8],everi:5,string:2,fals:[5,2],consequat:[],failur:[7,2],veri:[1,7,4],affect:4,risu:[],luctu:[],magic:6,level:[5,2],id_rsa:[0,8],list:[1,2,3,4,5,6,8,9],vivamu:[],item:5,ansible_librari:[],form:[5,4],dotnet:5,saltstack:1,mpdehaan:[],phasellu:[],ornar:[],natur:2,seper:4,chef:1,second:5,design:1,pass:4,eleifend:[],further:4,even:8,what:2,diam:[],favcolor:8,section:[1,4],abl:[],nec:[],abbrevi:5,version:[2,8],directori:2,ever:1,method:7,metadata:2,tar:0,suscipit:[],hash:2,eckersberg:5,here:[],leo:[],address:[6,2],path:2,sinc:8,valu:[5,2,4],aliquam:[],scelerisqu:[],great:1,purpos:[2,4],larger:[],host:[0,1,2,4,6,7,8],adipisc:[],prior:2,venenati:[],permit:5,action:[1,2,4],nulla:[],implement:7,iaculi:[],via:[0,1],regardless:[5,1],dictionari:5,accumsan:[],extra:4,apach:[4,8],modul:[0,1,2,4,7,8],prefer:[],put:[0,8],unix:4,api:[1,7,2],instal:[8,0,2,4,1],select:[6,4],httpd:4,from:[0,1,2,4,5,8],describ:2,would:8,commun:[1,3],visit:3,two:[5,0,6],noarch:0,dehaan:1,call:2,usr:[2,8],taken:4,sagitti:[],basi:4,checkout:2,until:0,more:[0,6,2,4,1],desir:[],idempot:[1,2,4],dbserver:[6,4],sbin:[2,8],agent:[0,8],particular:1,easiest:1,must:[5,2],none:[],join:3,ibm:[],module_arg:7,habitass:[],setup:[1,2,8],work:[6,8],critic:1,remain:1,tag:[0,2],can:[0,1,2,4,5,6,7,8],learn:[0,6,4,1],ero:[],root:[5,1,2,4],pick:5,employe:5,myapp:8,yamllint:5,ultric:[],process:[1,8],rpath:[],sudo:0,share:2,templat:[8,0,2,4,1],othervar:4,knows_oop:5,minimum:4,want:7,occur:4,nullam:[],alwai:2,multipl:[6,4,8],newlin:5,puru:[],sit:[],capistrano:1,ping:[0,7,2,1],write:[5,1,2,4,8],how:[0,1,2,4,5,6,7],etiam:[],yum:[1,2],simpl:[5,1,7,4,8],updat:8,arcu:[],express:[5,1,7,4],referenc:[6,4],clone:0,usabl:1,tristiqu:[],mai:[5,0],end:2,data:[5,7,2,8],parallel:[1,8],man:[1,9],repo:[2,8],github:[0,3],orchestr:[1,4],read:[5,0],bootstrap:1,favorit:1,turpi:[],element:[5,2],issu:3,inform:[2,4],mango:5,combin:5,asynchron:[1,4],order:4,talk:[],oper:[1,4,8],help:1,over:1,move:[2,4],orang:5,becaus:[],elit:5,rpmbuild:0,comma:5,vita:[],still:[],paramet:[2,4],jid:8,overlord:0,group:[1,7,3,4,6],cli:7,fit:[],yaml:[5,0,4,1],pend:[4,8],rapidli:7,infrastructur:[1,6],mail:[6,3],sapien:[],main:4,might:4,easier:[],non:[1,2],"return":[1,7,2],thei:[7,2,4,8],food:5,alist:4,nibh:[],egesta:[],"break":[],framework:[1,7],jinja2:[0,2,8],now:[0,2],nor:2,choic:1,multiprocess:0,name:[5,1,2,4],anyth:2,neccessari:[2,8],config:[1,4],viverra:[],datastructur:7,porta:[],separ:5,each:[5,2,4,8],stock:[],nearli:4,mean:2,metu:[],michael:1,auctor:[],realli:[5,4],contributor:[],backport:0,connect:[],our:5,todo:[],event:2,out:[5,1,2,4],variabl:[2,4,8],"try":0,shown:[],network:3,space:[1,2],reboot:8,content:[0,1],stuff:8,sshd:1,internet:1,correct:[5,1],red:8,state:[2,4,8],hendrerit:[],ntp:8,contain:[2,4],differ:[1,4,8],pub:8,control:[1,2,4,8],base:[1,4],lab:[],tempu:[],qui:[],org:0,molli:[],bash:[0,8],care:[],vestibulum:[],pyyaml:0,indent:5,maecena:[],could:7,fqdn:8,thing:[1,6],place:1,isn:1,principl:[],licens:1,first:[0,2,8,1],origin:[],softwar:[1,2],rang:1,notifi:[1,4,8],obviou:1,onc:2,number:2,yourself:0,hook:2,instruct:0,alreadi:[2,4],puppet:1,fast:1,enim:[],massiv:1,open:1,straight:8,given:8,convent:2,script:[0,1,4,5,7,8],associ:5,top:2,system:[0,1,2,4,6,8],messag:7,grow:[],too:1,statement:[1,4],molesti:[],john:5,banana:5,includ:[1,4],shell:[1,8],option:[5,9,2,4,8],tool:1,copi:[1,2,8],specifi:[5,2,8],quam:[],next:4,"short":1,kept:4,than:[0,2,8],serv:[],liter:2,target:[1,6],provid:5,sollicitudin:[],heavyweight:[],structur:5,charact:5,project:[0,3,8,1],architect:1,were:4,minut:[],uses_cv:5,pre:0,sai:4,runner:7,ani:[1,7,2,4,8],ant:[],download:0,have:[0,2,4,1],need:[5,0,2,8],tellu:[],seek:2,paramiko:0,engin:8,built:0,contact:[0,7,2],note:[2,8],also:[0,1,2,4,5,6,8],client:1,massa:[],build:[0,7],indic:2,environ:[],divers:1,pulvinar:[],begin:5,sure:[],unless:2,distribut:[0,1],deploy:[1,4],track:8,who:2,discov:4,most:[5,2],plai:2,regular:4,plan:2,deploi:[1,2,4,8],pair:2,why:1,porttitor:[],simplic:[],doc:1,later:8,cover:8,doe:[1,2,6],sodal:[],bracket:5,snapshot:2,clojur:[],wildcard:[1,6],dolor:[],someth:[1,8],awesom:[1,4],laoreet:[],blandit:[],verbos:2,syntax:[5,0,4],bring:[],directli:[2,4,8],raleigh:1,particularli:4,playbook:[0,1,2,4,5,6,7,8],permiss:2,hack:1,radic:1,pki:[],trivial:2,varnam:4,involv:[1,3],absolut:2,onli:[2,4],explicitli:4,locat:2,just:[8,0,4,1],pretti:7,configur:[5,0,6,4,1],releas:0,written:[1,2,4,8],should:[5,2],consectetur:[],somevar:4,congratul:0,variu:[],local:2,yml:4,long_running_oper:8,contribut:1,variou:[],get:[5,0,3,8,1],financ:1,stop:2,mission:1,bibendum:[],ssl:[],ssh:[0,8],malesuada:[],requir:[0,2,4,1],uvh:0,nisi:[],bar:6,lame:5,nisl:[],remot:[0,2,4,8],cra:[],orci:[],through:[0,2,1],where:[1,2,4],wrote:[],view:[3,9],set:[2,4],creator:[],elimin:[],see:[0,1,2,4,5,6,8],sed:[],result:[7,2],fail:4,sem:[],extend:1,ntp_server:8,faucibu:[],statu:8,kei:[5,0,2,4],databas:4,modularli:[],discoveri:2,restart:[2,4,8],behind:[],won:8,languag:[5,0,6,2,1],between:5,"import":7,irc:3,altern:8,elementum:[],manpag:[0,9],handful:[],aspir:[],style:2,job:[5,8],aserv:0,magna:[],webapp:8,amet:[],addit:[5,1],delimit:2,plugin:[],goal:1,against:[1,4,6],tempor:[],etc:[0,1,2,4,6,8],befor:[2,4],mani:8,placerat:[],com:[0,7,4,6],proin:[],sha:2,assur:4,simpli:2,author:1,overview:5,format:[2,4,8],inspir:[],colon:4,shutdown:2,linux:[1,4],poll:[1,4,8],rpm:[0,1],matti:[],dui:[],pretium:[],multiplay:1,morbi:[],three:6,been:[1,2],json:[1,7,2],much:1,basic:[5,0,6,2,1],ungroup:6,feugiat:[],quickli:[5,1],box:[1,2],fire:1,rubi:[5,2,8],vulput:[],argument:2,understand:0,pellentesqu:[],func:1,atlanta:8,job_statu:8,those:[5,2],emploi:5,authorized_kei:0,multi:[1,4],tortor:[],look:[6,4,8],nequ:[],hoc:[1,4],servic:[1,2,4],md5sum:2,batch:[],"while":4,overrid:2,ipsum:[],cobbler:1,real:0,motd:8,max_client:4,them:8,erat:[],conf:[4,8],module_nam:7,ship:[0,2],sever:5,http_port:4,develop:[5,0,1],inventori:[6,2],minim:0,make:[0,2,8],platea:[],same:[5,6,2,8],member:5,python:[0,1,2,5,7,8],complex:[1,4],success:2,fedora:[],document:[0,7,4],ansibl:[0,1,2,3,4,5,6,7,8,9],complet:[0,4],finish:[],http:2,webserv:[6,4,8],nest:2,painless:1,effect:4,dai:[],fruit:5,user:[1,2,4],ownership:[],extrem:0,php:8,distutil:[0,1],chang:[2,4,8],squar:5,exceedingli:[],task:[1,4,8],off:1,scenario:2,whole:[],well:[2,4],spent:[],exampl:[0,1,2,4,5,6,7,8],command:[0,1,2,4,6,8,9],thi:[0,1,2,4,5,6,8],choos:2,usual:4,comment:[1,4],protocol:2,execut:[1,2,4],less:[0,1],when:[2,4,8],skill:5,simultan:8,ligula:[],previous:[],web:[7,8],versu:1,easi:2,mix:[1,6],trigger:2,hac:[],except:4,littl:1,add:[0,8],other:[1,2,8],els:1,unlik:4,hat:[],match:4,take:2,bin:[2,8],applic:[7,4],which:[0,1,2,4,5,6],ohai:[1,2,4,8],dest:[2,4,8],tincidunt:[],dark:7,game:1,know:5,background:[1,8],world:0,bit:2,daemon:1,like:[5,6,4,8],specif:[1,7,8,6],signal:4,manual:[],integ:2,server:[1,2,4,8],edit:0,"boolean":5,either:2,velit:[],popular:1,async:[],page:[5,0,9,3,1],deal:[],suppli:2,some:0,back:4,dead:1,tumblr:[],home:[],librari:[],tmp:8,render:2,avoid:2,though:1,ultrici:[],per:7,tracker:3,unit:[],pattern:[1,7,4,6],foo:[6,4,8],complic:1,machin:[0,2,4,8],core:1,run:[0,7,2,4,8],power:[1,7],quit:[],lose:8,usag:[2,8],asciidoc:0,web2:7,step:[2,4],web1:7,repositori:0,"super":1,aenean:[],simpler:8,comparison:1,about:[5,0,2,4,1],gplv3:1,justo:[],libero:[],surround:5,manag:[5,0,6,4,1],srv:[4,8],quisqu:[],industri:1,own:[1,2,4],"final":5,bounc:2,automat:2,compos:4,down:4,ensur:4,perl:8,bserver:0,your:[0,1,2,4,5,6,8],praesent:[],git:[0,2,8,1],type:7,fabric:1,wai:[5,0,4,8],interdum:[],transfer:[1,8],dictum:[],support:[2,8],rotat:4,"long":[1,2,8],avail:[0,9,2,4,8],start:[5,0,2,4,1],appl:5,augu:[],lot:[1,8],suit:4,"var":[1,4],individu:6,fork:7,head:[2,8],doctyp:[],simplejson:0,eget:[],handler:[1,4,8],lint:5,msg:2,loborti:[],ullamcorp:[],line:[5,1,9,4,8],"true":[5,2],freenod:3,info:4,strawberri:5,made:[2,8],possibl:[6,4,8],whether:7,wish:[5,0,6],tell:[2,8],planet:1,record:5,below:8,limit:[1,8],suspendiss:[],otherwis:2,problem:[],similar:2,chip:1,facter:[1,2,4,8],curv:1,featur:[1,4],tasti:5,creat:1,lectu:[],doesn:1,repres:5,ansil:[],deferenc:4,file:[0,1,2,4,5,6,8],mauri:[],exist:[1,4],check:[2,8],urna:[],conval:[],googl:3,excel:1,nam:[],"default":[1,2,6],likes_emac:5,futur:0,dignissim:[],test:[0,2],you:[0,1,4,5,6,8],node:[0,1],dapibu:[],journei:[],gravida:[],sequenc:1,devop:1,push:4,est:[],feli:[],aliquet:[],src:[2,4,8],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:6,time:[0,1,2,4,6,8],far:1,serious:[],fermentum:[]},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Communicate and Get Involved","Playbooks","YAML Scripts","Patterns","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","communicate","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,7],rhoncu:[],func:1,perl:7,mcollect:1,prefix:[2,3,7],code:[1,2,7],lacu:[],follow:[5,2,3],scp:7,nunc:[],content:[0,1],depend:2,specif:[5,6,7],program:[1,2,3],vel:[],blindingli:1,spec:3,sourc:[1,2,3,7],everi:[4,3],string:2,fals:[4,2],consequat:[],failur:[6,2],veri:[1,6,3],affect:3,risu:[],luctu:[],magic:[],max_client:3,level:[4,2],id_rsa:[0,7],list:[1,2,3,4,5,7,8],vivamu:[],item:4,ansible_librari:[],dotnet:4,saltstack:1,phasellu:[],ornar:[],natur:2,seper:3,chef:1,second:4,design:1,pass:3,eleifend:[],further:3,even:7,what:2,diam:[],favcolor:7,section:[1,3],abl:[],nec:[],abbrevi:4,version:[2,7],directori:2,ever:1,method:6,metadata:2,suscipit:[],hash:2,eckersberg:4,lectu:[],here:[],leo:[],address:[5,2],path:2,sinc:7,valu:[4,2,3],aliquam:[],scelerisqu:[],great:1,purpos:2,larger:[],step:[2,3],adipisc:[],prior:2,venenati:[],permit:4,action:[1,2,3],nulla:[],implement:6,iaculi:[],via:[0,1],regardless:[4,1],tempu:[],extra:3,modul:[0,1,2,3,6,7],prefer:[],put:[0,7],unix:3,api:[1,6,2],instal:[7,0,2,3,1],should:[4,2],select:[1,3,5],httpd:3,from:[0,1,2,3,4,7],describ:[2,3],would:7,commun:1,visit:1,two:[4,0,5],noarch:0,ohai:[1,2,3,7],dehaan:1,call:2,usr:[2,7],taken:3,sagitti:[],care:[],checkout:2,until:0,more:[0,5,2,3,1],desir:3,idempot:[1,2,3],dbserver:5,sbin:[2,7],agent:[0,7],particular:1,easiest:1,must:[4,2,3],none:[],join:1,ibm:[],module_arg:6,dest:[2,3,7],habitass:[],setup:[1,2,7],work:[5,7],critic:1,remain:1,minimum:3,can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],about:[4,0,2,3,1],ero:[],root:[4,1,2,3],employe:4,conf:[3,7],yamllint:4,ultric:[],process:[1,7],rpath:[],sudo:0,share:2,templat:[7,0,2,3,1],libero:[],knows_oop:4,liter:2,want:6,occur:3,nullam:[],alwai:2,multipl:[5,3,7],newlin:4,puru:[],sit:[],capistrano:1,ping:[0,6,2,1],write:[4,1,2,3,7],how:[0,1,2,3,4,5,6],etiam:[],place:1,config:[1,3],stock:[],arcu:[],financ:1,referenc:[5,3],clone:0,lab:[],tristiqu:[],ohai_:3,contribut:1,mai:[4,0],end:2,associ:4,grow:[],man:[1,8],bibendum:[],"short":1,orchestr:[0,1,2,3,5,7],bootstrap:1,favorit:1,turpi:[],element:[4,2],issu:1,inform:[2,3],mango:4,combin:4,order:3,talk:[],origin:[],help:1,over:1,move:[2,3],orang:4,becaus:[],elit:4,rpmbuild:0,comma:4,vita:[],still:[],paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,fit:[],yaml:[4,0,3,1],pend:[3,7],rapidli:6,infrastructur:[1,5],mail:[1,5],sapien:[],main:3,might:3,easier:[],non:[1,2],"return":[1,6,2],thei:[6,2,3,7],food:4,alist:3,nibh:[],egesta:[],"break":[],framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3],anyth:2,neccessari:[2,7],simpl:[4,1,6,3,7],viverra:[],instruct:0,porta:[],separ:4,exampl:[0,1,2,3,4,5,6,7],each:[4,2,3,7],updat:7,mean:[2,3],metu:[],michael:1,auctor:[],render:2,realli:[4,3],ensur:3,backport:0,connect:[],our:4,todo:[],event:2,out:[4,1,2,3],variabl:[2,3,7],"try":0,shown:[],network:1,space:[1,2],reboot:7,bubbl:3,cra:[],internet:1,correct:[4,1,3],red:7,painless:1,hendrerit:[],ntp:7,orci:[],given:7,pub:7,control:[1,2,3,7],base:[1,3],usabl:1,dictionari:4,qui:[],org:0,molli:[],bash:[0,7],basi:3,vestibulum:[],pyyaml:0,indent:4,maecena:[],could:6,fqdn:7,thing:[1,3],yum:[1,2],isn:1,principl:[],licens:1,first:[0,2,7,1],oper:[1,3,7],softwar:[1,2],rang:1,notifi:[1,3,7],obviou:1,onc:2,number:2,yourself:0,hook:2,datastructur:6,alreadi:[2,3],puppet:1,"long":[1,2,7],enim:[],massiv:1,open:1,differ:[1,3,7],praesent:[],convent:2,script:[0,1,3,4,6,7],data:[4,6,2,7],top:2,system:[0,1,2,3,5,7],messag:6,parallel:[1,7],appl:4,too:1,statement:[1,3],molesti:[],john:4,banana:4,shell:[1,7],option:[4,8,2,3,7],behind:[],tool:1,copi:[1,2,7],specifi:[4,2,7],quam:[],github:[0,1],off:1,exactli:3,than:[0,2,3,7],serv:[],target:[1,5],provid:4,sollicitudin:[],heavyweight:[],structur:4,charact:4,project:[0,7,1],architect:1,were:3,minut:[],uses_cv:4,pre:0,sai:3,runner:6,argument:2,ant:[],download:0,have:[0,2,3,1],need:[4,0,2,7],tellu:[],seek:2,paramiko:0,engin:7,built:0,note:[5,2,7],also:[0,1,2,3,4,5,7],client:1,massa:[],build:[0,6],indic:2,environ:[],divers:1,pulvinar:[],begin:4,sure:[],unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,who:2,discov:3,most:[4,2],plai:[2,3],regular:3,plan:2,deploi:[1,2,3,7],pair:2,why:1,porttitor:[],simplic:[],conval:[],doc:1,later:7,cover:7,doe:[1,2,5],sodal:[],bracket:[4,5],snapshot:2,clojur:[],wildcard:5,dolor:[],modularli:[],awesom:[1,3],laoreet:[],blandit:[],verbos:2,syntax:[4,0,3],bring:3,directli:[2,3,7],raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],permiss:2,hack:1,radic:1,pki:[],trivial:2,varnam:3,involv:1,absolut:2,onli:2,explicitli:3,locat:2,execut:[1,2,3],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],written:[1,2,3,7],accumsan:[],consectetur:[],somevar:3,freenod:1,variu:[],local:2,yml:3,long_running_oper:7,nearli:3,variou:[],get:[4,0,7,1],express:[4,1,6,3],stop:2,mission:1,repo:[2,7],ssl:[],ssh:[0,7],malesuada:[],requir:[0,2,1],uvh:0,nisi:[],bar:5,lame:4,nisl:[],remot:[0,2,3,7],stuff:7,contain:[2,3],through:[0,2,1],told:3,where:[1,2,3],wrote:[],view:[1,8],user:[1,2,3],set:[2,3],creator:[],elimin:[],see:[0,1,2,3,4,5,7],sed:[],result:[6,2],fail:3,sem:[],extend:1,servic:[1,2,3],faucibu:[],statu:7,manpag:[0,8],databas:3,someth:[1,7],discoveri:2,restart:[2,3,7],state:[2,3,7],won:7,ligula:[],between:4,"import":6,irc:1,altern:7,elementum:[],kei:[4,0,2,3],handful:[],aspir:[],style:2,job:[4,7],entir:3,aserv:0,magna:[],webapp:7,amet:[],addit:[4,1],delimit:2,plugin:[],goal:1,against:[1,3,5],tempor:[],etc:[0,1,2,3,5,7],befor:[2,3],mani:7,placerat:[],planet:1,com:[0,6,5],proin:[],sha:2,skill:4,assur:3,simpli:2,overview:4,inspir:[],header:5,colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],matti:[],dui:[],pretium:[],multiplay:1,morbi:[],three:5,been:[1,2],json:[1,6,2],much:1,far:1,basic:[4,0,5,2,1],ungroup:[],feugiat:[],quickli:[4,1],box:[1,2],wish:[4,0,5],derefer:3,fire:1,rubi:[4,2,7],vulput:[],ani:[1,6,2,3,7],likes_emac:4,understand:0,pellentesqu:[],donec:[],minim:0,atlanta:7,job_statu:7,those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],tortor:[],look:[5,3,7],hoc:[1,3],straight:7,md5sum:2,batch:[],"while":3,overrid:2,ipsum:[],cobbler:1,bin:[2,7],motd:7,tar:0,them:[3,7],erat:[],myapp:7,module_nam:6,ship:[0,2],sever:4,http_port:3,develop:[4,0,1],inventori:[1,2,3,5],author:1,make:[0,2,3,7],platea:[],same:[4,5,2,3,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],fedora:[],document:[0,6,3],ansibl:[0,1,2,3,4,5,6,7,8],complet:[0,3],finish:[],http:2,webserv:[5,3,7],denot:5,nest:2,pick:4,effect:3,dai:[],fruit:4,fusc:[],ownership:[],extrem:0,php:7,distutil:[0,1],chang:[2,3,7],squar:4,exceedingli:[],task:[1,3,7],kept:3,scenario:2,whole:[],well:[2,3],spent:[],contact:[0,6,2],command:[0,1,2,3,5,7,8],thi:[0,1,2,3,4,5,7],choos:2,usual:3,comment:[],protocol:2,just:[7,0,3,1],less:[0,1],excel:1,ntp_server:7,simultan:7,languag:[4,0,5,2,1],previous:[],web:[6,7],versu:1,easi:2,mix:5,hac:[],except:3,littl:1,add:[0,7],simplejson:0,els:1,unlik:3,hat:[],match:3,take:2,real:0,applic:[6,3],which:[0,1,2,3,4,5],format:[7,1,2,3,5],read:[4,0],tincidunt:[],dark:6,game:1,know:4,background:[1,7],world:0,bit:2,daemon:1,like:[4,5,3,7],success:2,signal:3,manual:[],integ:2,server:[1,2,3,7],edit:0,"boolean":4,either:2,velit:[],popular:1,async:[],page:[4,0,8,1],deal:[],suppli:2,some:0,back:3,dead:1,tumblr:[],home:[],librari:[],tmp:7,est:[],augu:[],avoid:2,though:1,ultrici:[],per:6,tracker:1,unit:[],pattern:[1,6,3,5],foo:[5,7],complic:1,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],quit:[],lose:7,usag:[2,7],devop:1,web2:6,host:[0,1,2,3,5,6,7],web1:6,repositori:0,output:3,"super":1,aenean:[],simpler:7,comparison:1,sshd:1,gplv3:1,justo:[],othervar:3,surround:4,manag:[0,1,2,3,4,5,7],srv:[3,7],quisqu:[],industri:1,own:[1,2,3],"final":4,bounc:2,tag:[0,2],automat:2,compos:3,down:3,contributor:[],next:3,bserver:0,your:[0,1,2,3,4,5,7],mpdehaan:[],git:[0,2,7,1],fabric:1,wai:[4,0,3,7],interdum:[],transfer:[1,7],dictum:[],support:[2,7],rotat:3,fast:1,avail:[0,8,2,3,7],start:[4,0,2,3,1],trigger:2,includ:[1,3],lot:[1,7],suit:3,"var":[1,3],individu:5,fork:6,head:[2,7],doctyp:[],form:[4,3],eget:[],handler:[1,3,7],lint:4,msg:2,loborti:[],ullamcorp:[],line:[4,1,8,3,7],"true":[4,2],congratul:0,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,type:6,tell:[2,7],asynchron:[1,3],record:4,below:7,limit:[1,7],suspendiss:[],rerun:3,otherwis:2,problem:3,similar:2,chip:1,facter:[1,2,3,7],curv:1,featur:[1,3],tasti:4,creat:1,certain:3,doesn:1,repres:4,ansil:[],deferenc:3,file:[0,1,2,3,4,5,7],mauri:[],exist:[1,3],check:[2,7],urna:[],nequ:[],again:3,googl:1,when:[2,3,7],nam:[],"default":[1,2,5],other:[1,2,3,7],futur:0,dignissim:[],test:[0,2],you:[0,1,3,4,5,7],node:[0,1],dapibu:[],journei:[],gravida:[],sequenc:1,asciidoc:0,releas:0,feli:[],aliquet:[],src:[2,3,7],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:5,time:[0,1,2,3,5,7],push:3,serious:[],fermentum:[]},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Scripts","The Inventory File, Patterns, and Groups","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file diff --git a/rst/communicate.rst b/rst/communicate.rst deleted file mode 100644 index cd718ddcbfb..00000000000 --- a/rst/communicate.rst +++ /dev/null @@ -1,9 +0,0 @@ -Communicate and Get Involved -=========================== - -* Join the `ansible-project mailing list <http://groups.google.com/group/ansible-project>`_ on Google Groups -* Join `#ansible <irc://irc.freenode.net/#ansible>`_ on the `freenode IRC network <http://freenode.net/>`_ -* Visit the `project page <https://github.com/ansible/ansible>`_ on Github - - - View the `issue tracker <https://github.com/ansible/ansible/issues>`_ - diff --git a/rst/index.rst b/rst/index.rst index 4ab721e4e24..c4fa56a4993 100644 --- a/rst/index.rst +++ b/rst/index.rst @@ -35,18 +35,15 @@ Design Goals * Be usable as non-root * Create the easiest config management system to use, ever. -About the Author -```````````````` +Communicate and Get Involved +```````````````````````````` -Michael DeHaan is a Raleigh, NC based software developer and architect. He created other -DevOps programs such as Cobbler, the popular Linux install server. -Cobbler is used to deploy mission critical systems all over the planet, in industries -ranging from massively multiplayer gaming, core internet infrastructure, finance, -chip design, and more. Michael also helped co-author of Func, which is used -to orchestrate systems in lots of diverse places. +* Join the `ansible-project mailing list <http://groups.google.com/group/ansible-project>`_ on Google Groups +* Join `#ansible <irc://irc.freenode.net/#ansible>`_ on the `freenode IRC network <http://freenode.net/>`_ +* Visit the `project page <https://github.com/ansible/ansible>`_ on Github + + - View the `issue tracker <https://github.com/ansible/ansible/issues>`_ -Ansible is an GPLv3 licensed open source project, so see the contributions section for how to -get involved. Contents ======== @@ -61,5 +58,18 @@ Contents playbooks examples api - communicate man + +About the Author +```````````````` + +Michael DeHaan is a Raleigh, NC based software developer and architect. He created other +DevOps programs such as Cobbler, the popular Linux install server. +Cobbler is used to deploy mission critical systems all over the planet, in industries +ranging from massively multiplayer gaming, core internet infrastructure, finance, +chip design, and more. Michael also helped co-author of Func, which is used +to orchestrate systems in lots of diverse places. + +Ansible is an GPLv3 licensed open source project, so see the contributions section for how to +get involved. + diff --git a/rst/modules.rst b/rst/modules.rst index 540aad2bf7d..b17d5044481 100644 --- a/rst/modules.rst +++ b/rst/modules.rst @@ -1,6 +1,9 @@ Ansible Modules =============== +Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible playbooks. + .. seealso:: :doc:`examples` @@ -10,16 +13,8 @@ Ansible Modules :doc:`api` Examples of using modules with the Python API - -About Modules -````````````` - -Ansible ships with a number of modules that can be executed directly on remote hosts or through -ansible playbooks. - - -Idempotence -``````````` +Module Idempotence +``````````````````` Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can @@ -189,7 +184,7 @@ yum This module is in plan. -WRITING YOUR OWN MODULES +writing your own modules ```````````````````````` To write your own modules, simply follow the convention of those already available in diff --git a/rst/patterns.rst b/rst/patterns.rst index 6b73114199e..8ef369b225c 100644 --- a/rst/patterns.rst +++ b/rst/patterns.rst @@ -1,5 +1,5 @@ -Patterns -======== +The Inventory File, Patterns, and Groups +======================================== How to select hosts you wish to manage @@ -10,6 +10,9 @@ How to select hosts you wish to manage :doc:`playbooks` Learning ansible's configuration management language +Inventory File Format ++++++++++++++++++++++ + Ansible works against multiple systems in your infrastructure at the same time. It does this by selecting portions of systems listed in Ansible's inventory file, which defaults to /etc/ansible/hosts, and looks like this:: @@ -25,45 +28,36 @@ which defaults to /etc/ansible/hosts, and looks like this:: two.example.com three.example.com -Targetting All Systems -`````````````````````` -The pattern 'all' or '*' targets all systems in the inventory file. - -Specific Hosts -`````````````` +Selecting Targets ++++++++++++++++++ -It is possible to address specific hosts: +These patterns target all hosts in the inventory file:: + + all + * + +It is also possible to address specific hosts:: one.example.com one.example.com:two.example.com -Groups -`````` -The following patterns address one or more groups: +The following patterns address one or more groups, which are denoted with the bracket +headers in the inventory file:: webservers webservers:dbservers -There is also a magic group 'ungrouped' which selects systems not in a group. - -Wildcards -````````` - Individual hosts, but not groups, can also be referenced using wildcards: *.example.com *.com -Mixing Things Up -```````````````` - -Specific hosts, wildcards, and groups can all be mixed in the same pattern +It's also ok to mix wildcard patterns and groups at the same time:: one*.com:dbservers -It is not possible to target a host not in the inventory file. - +NOTE: It is not possible to target a host not in the inventory file. diff --git a/rst/playbooks.rst b/rst/playbooks.rst index 75da6a66253..fb23c4cf0ab 100644 --- a/rst/playbooks.rst +++ b/rst/playbooks.rst @@ -1,5 +1,5 @@ -Playbooks -========= +Playbooks: Ansible for Deployment, Configuration Management, and Orchestration +============================================================================== .. seealso:: @@ -11,22 +11,20 @@ Playbooks Learn about how to select hosts -Playbooks are a completely different way to use ansible and are particularly awesome. - -They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec. +Playbooks are a completely different way to use ansible and are particularly awesome. They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec. Playbook Example ```````````````` Playbooks are expressed in YAML format and have a minimum of syntax. Each playbook is composed -of one or more patterns in a list. By composing a playbook of multiple patterns, it is possible +of one or more 'plays' in a list. By composing a playbook of multiple 'plays', it is possible to orchestrate multi-machine deployments, running certain steps on all machines in the webservers group, then certain steps on the database server group, then more commands back on the webservers group, etc:: --- - - hosts: all + - hosts: webservers vars: http_port: 80 max_clients: 200 @@ -45,38 +43,39 @@ back on the webservers group, etc:: Hosts line `````````` -The hosts line is alist of one or more groups or host patterns, seperated by colons.:: - - webservers:dbservers:*.foo.example.com +The hosts line is alist of one or more groups or host patterns, seperated by colons, as +described in the 'patterns' documentation. Vars section ```````````` -A list of variables that can be used in the 'action' lines of the template, or in -included templates. Variables are deferenced like this:: +A list of variables that can be used in the templates, action lines, or included files. +Variables are deferenced using ``jinja2`` syntax like this:: {{ varname }} -These variables will be pushed down to the managed systems for use in templating operations. +These variables will be pushed down to the managed systems for use in templating operations, where +the way to dereference them in templates is exactly the same. Further, if there are discovered variables about the system (say, if facter or ohai were installed) these variables bubble up back into the playbook, and can be used on each -system just like explicitly set variables. Facter variables are prefixed with 'facter' -and Ohai variables are prefixed with 'ohai'. +system just like explicitly set variables. Facter variables are prefixed with 'facter_' +and Ohai variables are prefixed with 'ohai_'. Tasks list `````````` -Tasks are executed in order, one at a time, against all machines matched by the host -pattern, before moving on to the next task. Failed tasks are taken out of the rotation. +Each play contains a list of tasks. Tasks are executed in order, one at a time, against +all machines matched by the play's host pattern, before moving on to the next task. +Hosts with failed tasks are taken out of the rotation for the entire playbook. If things fail, +correct the problem and rerun. Modules other than command are idempotent, meaning if you +run them again, they will make the changes they are told to make to bring the system to +the desired state. -Task name and comment -````````` +Task name and action +````````````````````` -Each task has a name (required) and optional comment. This is for informational purposes only - -Task action -``````````` +Every task must have a name, which is included in the output from running the playbook. The action line is the name of an ansible module followed by parameters. Usually these are expressed in key=value form, except for the command module, which looks just like a Linux/Unix