Docs updates

This commit is contained in:
Michael DeHaan 2012-03-08 13:36:47 -05:00
parent 89a00e6385
commit 12fd193450
40 changed files with 1857 additions and 1495 deletions

@ -1 +1 @@
Subproject commit 8e20ed3714b7a43279ecfd38a7812b28e1533f03
Subproject commit 96d39a0dff9ccba4074479ca42eac0068733b803

View file

@ -20,6 +20,7 @@ __docformat__ = 'restructuredtext'
import os
import sys
import traceback
from sphinx.application import Sphinx
from os import path
@ -68,12 +69,7 @@ class SphinxBuilder(object):
# print "Run 'make htmlman' to recreate the problem."
#print "Your docs are now in %s" % outdir
except ImportError, ie:
print >> sys.stderr, "You don't seem to have the following which"
print >> sys.stderr, "are required to make documentation:"
print >> sys.stderr, "\tsphinx.application.Sphinx"
print >> sys.stderr, "This is usually available from the python-sphinx package"
print >> sys.stderr, "=== Error message received while attempting to build==="
print >> sys.stderr, ie
traceback.print_exc()
except Exception, ex:
print >> sys.stderr, "FAIL! exiting ... (%s)" % ex

View file

@ -23,8 +23,8 @@
<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="prev" title="Getting Started" href="gettingstarted.html" />
<link rel="next" title="Playbooks" href="playbooks.html" />
<link rel="prev" title="Ansible Modules" href="modules.html" />
</head>
<body>
<div class="related">
@ -34,10 +34,10 @@
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="patterns.html" title="Patterns"
<a href="playbooks.html" title="Playbooks"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="gettingstarted.html" title="Getting Started"
<a href="modules.html" title="Ansible Modules"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
@ -50,7 +50,9 @@
<div class="section" id="yaml-scripts">
<h1>YAML Scripts<a class="headerlink" href="#yaml-scripts" title="Permalink to this headline"></a></h1>
<p>This page provides a basic overview of correct YAML syntax.</p>
<p>This page provides a basic overview of correct YAML syntax, which is how Ansible
playbooks (our configuration management language) are expressed.
You may also wish to read playbook examples and will quickly pick this up from those.</p>
<div class="section" id="yaml-basics">
<h2>YAML Basics<a class="headerlink" href="#yaml-basics" title="Permalink to this headline"></a></h2>
<p>For <cite>ansible</cite>, every YAML script must be a list at it&#8217;s root-most
@ -111,7 +113,7 @@ languages:
dotnet: Lame</pre>
</div>
<p>That&#8217;s all you really need to know about YAML to get started writing
<cite>Ansible</cite> scripts.</p>
<cite>Ansible</cite> playbooks.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
@ -137,11 +139,11 @@ languages:
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="gettingstarted.html"
title="previous chapter">Getting Started</a></p>
<p class="topless"><a href="modules.html"
title="previous chapter">Ansible Modules</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="patterns.html"
title="next chapter">Patterns</a></p>
<p class="topless"><a href="playbooks.html"
title="next chapter">Playbooks</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/YAMLScripts.txt"
@ -150,7 +152,7 @@ languages:
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -171,18 +173,18 @@ languages:
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="patterns.html" title="Patterns"
<a href="playbooks.html" title="Playbooks"
>next</a> |</li>
<li class="right" >
<a href="gettingstarted.html" title="Getting Started"
<a href="modules.html" title="Ansible Modules"
>previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -1,8 +1,9 @@
YAML Scripts
============
This page provides a basic overview of correct YAML syntax.
This page provides a basic overview of correct YAML syntax, which is how Ansible
playbooks (our configuration management language) are expressed.
You may also wish to read playbook examples and will quickly pick this up from those.
YAML Basics
-----------
@ -74,7 +75,7 @@ Finally, you can combine these data structures::
dotnet: Lame
That's all you really need to know about YAML to get started writing
`Ansible` scripts.
`Ansible` playbooks.
.. seealso::

View file

@ -1,55 +1,35 @@
API
===
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
The Python API is very powerful, and is how the ansible CLI and ansible-playbook
are implemented.
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
It's pretty simple::
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
import ansible.runner
runner = ansible.runner.Runner(
module_name='ping',
module_args='',
pattern='web*',
forks=10
)
datastructure = runner.run()
The run method returns results per host, grouped by whether they
could be contacted or not. Return types are module specific, as
expressed in the 'ansible-modules' documentation.::
{
"dark" : {
"web1.example.com" : "failure message"
}
"contacted" : {
"web2.example.com" : 1
}
}
A module can return any type of JSON data it wants, so Ansible can
be used as a framework to rapidly build powerful applications and scripts.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,55 +1,9 @@
Communicate
===========
Communicate and Get Involved
===========================
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
* 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
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
- View the `issue tracker <https://github.com/ansible/ansible/issues>`_
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,71 +1,65 @@
Examples
========
Examples 1
``````````
.. seealso::
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
:doc:`modules`
A list of available modules
:doc:`playbooks`
Alternative ways to use ansible
Examples 2
``````````
Parallelism and Shell Commands
``````````````````````````````
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
Reboot all web servers in Atlanta, 10 at a time::
Examples 3
``````````
ssh-agent bash
ssh-add ~/.ssh/id_rsa.pub
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
ansible atlanta -a "/sbin/reboot" -f 10
Examples 3
``````````
The -f 10 specifies the usage of 10 simultaneous processes.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there.
Example 2: Time Limited Background Operations
`````````````````````````````````````````````
Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won't lose track. Polling support is pending in the command line.::
ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff"
ansible all -n job_status -a jid=123456789
Any module other than 'copy' or 'template' can be backgrounded.
Examples 3: File Transfer & Templating
``````````````````````````````````````
Ansible can SCP lots of files to multiple machines in parallel, and optionally use them as template sources.
To just transfer a file directly to many different servers::
ansible atlanta copy -a "/etc/hosts /tmp/hosts"
To use templating, first run the setup module to put the template variables you would like to use on the remote host. Then use the template module to write the files using the templates. Templates are written in Jinja2 format. Playbooks (covered below) will run the setup module for you, making this even simpler.::
ansible webservers -m setup -a "favcolor=red ntp_server=192.168.1.1"
ansible webservers -m template -a "src=/srv/motd.j2 dest=/etc/motd"
ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"
Need something like the fqdn in a template? If facter or ohai are installed, data from these projects will also be made available to the template engine, using 'facter' and 'ohai' prefixes for each.
Examples 3: Deploying From Source Control
`````````````````````````````````````````
Deploy your webapp straight from git::
ansible webservers -m git -a "repo=git://foo dest=/srv/myapp version=HEAD"
Since ansible modules can notify change handlers (see 'Playbooks') it is possible to tell ansible to run specific tasks when the code is updated, such as deploying Perl/Python/PHP/Ruby directly from git and then restarting apache.
Examples 4
``````````
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,67 +1,100 @@
Getting Started
===============
How to ansible
How to download ansible and get started using it
.. seealso::
:doc:`examples`
Examples of basic commands
:doc:`YAMLScripts`
Complete documentation of the YAML syntax `ansible` understands.
Complete documentation of the YAML syntax `ansible` understands for playbooks.
:doc:`playbooks`
Learning ansible's configuration management language
:doc:`modules`
Learn about modules that ship with ansible
Requirements
````````````
Requirements are extremely minimal.
If you are running python 2.6 on the **overlord** machine, you will
need:
* ``paramiko``
* ``PyYAML``
* ``python-jinja2`` (for playbooks)
If you are running less than Python 2.6, you will also need:
* The Python 2.4 or 2.5 backport of the ``multiprocessing`` module
- `Installation and Testing Instructions <http://code.google.com/p/python-multiprocessing/wiki/Install>`_
* ``simplejson``
On the managed nodes, to use templating, you will need:
* ``python-jinja2`` (you can install this with ansible)
Developer Requirements
``````````````````````
For developers, you may wish to have:
* ``asciidoc`` (for building manpage documentation)
* ``python-sphinx`` (for building content for ansible.github.com)
What you need
-------------
Getting Ansible
```````````````
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
Tagged releases are available as tar.gz files from the Ansible github
project page:
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
* `Ansible/downloads <https://github.com/ansible/ansible/downloads>`_
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
You can also clone the git repository yourself and install Ansible in
one of two ways:
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.
Python Distutils
++++++++++++++++
You can also install Ansible using Python Distutils::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ sudo make install
Via RPM
+++++++
In the near future, pre-built RPMs will be available through your distribution. Until that time you
can use the ``make rpm`` command::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ make rpm
$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm
Your first commands
```````````````````
Edit /etc/ansible/hosts and put one or more remote systems in it, for which you have your SSH
key in ``authorized_keys``::
192.168.1.50
aserver.example.org
bserver.example.org
Now try this:
ssh-agent bash
ssh-add ~/.ssh/id_rsa
ansible all -m ping
Congratulations. You've just contacted your nodes with Ansible. It's now time to read some
of the more real-world examples.

View file

@ -5,102 +5,48 @@
Ansible
=======
Ansible is a extra-simple tool/API for doing 'parallel remote things'
over SSH -- whether executing commands, running "modules", or
executing larger 'playbooks' that can serve as a configuration
management or deployment system.
Ansible is a radically simple deployment, configuration, and command execution framework.
Other tools in this space have been too complicated for too long, require too much bootstrapping,
and have too much learning curve. Ansible is dead simple and painless to extend. For comparison, Puppet and Chef have about 60k lines of code. Ansible's core is a little over 1000 lines.
While `Func installation <http://fedorahosted.org/func>`_ which I
co-wrote, aspired to avoid using SSH and have it's own daemon
infrastructure, Ansible aspires to be quite different and more
minimal, but still able to grow more modularly over time. This is
based on talking to a lot of users of various tools and wishing to
eliminate problems with connectivity and long running daemons, or not
picking tool `X` because they preferred to code in `Y`. Further,
playbooks take things a whole step further, building the config and
deployment system I always wanted to build.
Ansible isn't just for configuration -- it's also great for Ad-Hoc tasks,
quickly firing off commands against nodes. Where Ansible excels though, is expressing complex multi-node deployment processes, executing complex sequences of commands on different hosts through the "playbooks" feature.
Why use Ansible versus something else? (Fabric, Capistrano,
Ansible does not require programming in any particular language -- you can write modules
as scripts or programs that return simple JSON.
Why use Ansible versus something else? (Puppet, Chef, Fabric, Capistrano,
mCollective, Func, SaltStack, etc?) It will have far less code, it
will be more correct, and it will be the easiest thing to hack on and
use you'll ever see -- regardless of your favorite language of choice.
Want to only code plugins in bash or clojure? Ansible doesn't care.
The docs will fit on one page and the source will be blindingly
obvious.
Systems management doesn't have to be complicated. Ansible's docs will remain
short & simple, and the source will be blindingly obvious.
Design Principles
`````````````````
Design Goals
````````````
* Dead simple setup
* Super fast & parallel by default
* No server or client daemons; use existing SSHd
* No server or client daemons; use existing SSHd out of the box
* No additional software required on client boxes
* Modules can be written in ANY language
* Awesome API for creating very powerful distributed scripts
* Be usable as non-root
* Create the easiest config management system to use, ever.
About the Author
````````````````
Requirements
````````````
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.
Requirements are extremely minimal.
If you are running python 2.6 on the **overlord** machine, you will
need:
* ``paramiko``
* ``PyYAML``
* ``python-jinja2`` (for playbooks)
* ``Asciidoc`` (for building documentation)
If you are running less than Python 2.6, you will also need:
* The Python 2.4 or 2.5 backport of the ``multiprocessing`` module
- `Installation and Testing Instructions <http://code.google.com/p/python-multiprocessing/wiki/Install>`_
* ``simplejson``
On the managed nodes, to use templating, you will need:
* ``python-jinja2`` (you can install this with ansible)
Getting Ansible
```````````````
Tagged releases are available as tar.gz files from the Ansible github
project page:
* `Ansible/downloads <https://github.com/ansible/ansible/downloads>`_
You can also clone the git repository yourself and install Ansible in
one of two ways:
Python Distutils
++++++++++++++++
You can install Ansible using Python Distutils::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ sudo make install
Via RPM
+++++++
In the future, pre-built RPMs may be available. Until that time you
can use the ``make rpm`` command::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ make rpm
$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm
Ansible is an GPLv3 licensed open source project, so see the contributions section for how to
get involved.
Contents
========
@ -109,21 +55,11 @@ Contents
:maxdepth: 3
gettingstarted
YAMLScripts
patterns
modules
YAMLScripts
playbooks
examples
api
communicate
man
Communicate or 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>`_

View file

@ -3,19 +3,10 @@
Man Pages
=========
Ansile ships with a handfull of manpages to help you on your journey.
Ansible's manpage lists available command line options.
ansible(1)
----------
* `View ansible.1 <man/ansible.1.html>`_
ansible-modules(5)
------------------
* `View ansible-modules.5 <man/ansible-modules.5.html>`_
ansible-playbook(5)
-------------------
* `View ansible-playbook.5 <man/ansible-playbook.5.html>`_

View file

@ -1,55 +1,201 @@
Modules
=======
Ansible Modules
===============
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
.. seealso::
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
:doc:`examples`
Examples of using modules in /usr/bin/ansible
:doc:`playbooks`
Examples of using modules with /usr/bin/ansible-playbook
:doc:`api`
Examples of using modules with the Python API
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
About Modules
`````````````
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.
Ansible ships with a number of modules that can be executed directly on remote hosts or through
ansible playbooks.
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
trigger change events. Unless otherwise noted, all modules support change hooks.
command
```````
The command module takes the command name followed by a list of arguments, space delimited.
This is the only module that does not use key=value style parameters.
Example usage::
/sbin/shutdown -t now
This module does not support change hooks and returns the return code from the program as well as timing information about how long the command was running for.
copy
````
The copy module moves a file on the local box to remote locations.
*src*::
Local absolute path to a file to copy to the remote server
*dest*::
Remote absolute path where the file should end up
This module also returns md5sum information about the resultant file.
facter
``````
Runs the discovery program 'facter' on the remote system, returning
JSON data that can be useful for inventory purposes.
Requires that 'facter' and 'ruby-json' be installed on the remote end.
This module is informative only - it takes no parameters & does not support change hooks,
nor does it make any changes on the system.
git
```
Deploys software from git checkouts.
*repo*::
git or http protocol address of the repo to checkout
*dest*::
where to check it out, an absolute directory path
*version*::
what version to check out -- either the git SHA, the literal string 'HEAD', or a tag name
ohai
````
Similar to the facter module, this returns JSON inventory data. Ohai
data is a bit more verbose and nested than facter.
Requires that 'ohai' be installed on the remote end.
This module is information only - it takes no parameters & does not
support change hooks, nor does it make any changes on the system.
ping
````
A trivial test module, this module always returns the integer '1' on
successful contact.
This module does not support change hooks.
This module is informative only - it takes no parameters & does not
support change hooks, nor does it make any changes on the system.
service
```````
Controls services on remote machines.
*state*
Values are 'started', 'stopped', or 'restarted'. Started/stopped
are idempotent actions that will not run commands unless neccessary.
'restarted' will always bounce the service
*name*
The name of the service
setup
`````
Writes a JSON file containing key/value data, for use in templating.
Call this once before using the template modules. Playbooks will
execute this module automatically as the first step in each play.
If facter or ohai are installed, variables from these programs will also
be snapshotted into the JSON file for usage in templating. These variables
are prefixed with 'facter_' and 'ohai_" so it's easy to tell their source.
*metadata*
Optionally overrides the default JSON file location of /etc/ansible/setup or ~/ansible/setup
depending on what remote user has been specified.
If used, also supply the metadata parameter to the template module.
*anything*
any other parameters can be named basically anything, and set a key=value
pair in the JSON file for use in templating.
template
````````
Templates a file out to a remote server. Call the setup module prior to usage.
*src*
path of a Jinja2 formatted template on the local server
*dest*
location to render the template on the remote server
*metadata*
location of a JSON file to use to supply template data. Default is /etc/ansible/setup
which is the same as the default for the setup module. Change if running as a non-root
remote user who does not have permissions on /etc/ansible.
This module also returns md5sum information about the resultant file.
user
````
This module is in plan.
yum
```
This module is in plan.
WRITING YOUR OWN MODULES
````````````````````````
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.
To support change hooks, modules should return hashes with a changed: True/False
element at the top level. Modules can also choose to indicate a failure scenario
by returning a top level 'failure' element with a True value, and a 'msg' element
describing the nature of the failure. Other values are up to the module.

View file

@ -1,55 +1,69 @@
Patterns
========
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
How to select hosts you wish to manage
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
.. seealso::
:doc:`examples`
Examples of basic commands
:doc:`playbooks`
Learning ansible's configuration management language
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::
mail.example.com
[webservers]
foo.example.com
bar.example.com
[dbservers]
one.example.com
two.example.com
three.example.com
Targetting All Systems
``````````````````````
The pattern 'all' or '*' targets all systems in the inventory file.
Specific Hosts
``````````````
It is possible to address specific hosts:
one.example.com
one.example.com:two.example.com
Groups
``````
The following patterns address one or more groups:
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
one*.com:dbservers
It is not possible to target a host not in the inventory file.
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,55 +1,118 @@
Playbooks
=========
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
.. seealso::
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
:doc:`YAMLScripts`
Learn about YAML syntax
:doc:`modules`
Learn about available modules and writing your own
:doc:`patterns`
Learn about how to select hosts
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
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
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 line
``````````
The hosts line is alist of one or more groups or host patterns, seperated by colons.
webservers:dbservers:*.foo.example.com
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::
{{ varname }}
These variables will be pushed down to the managed systems for use in templating operations.
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'.
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.
Task name and comment
`````````
Each task has a name (required) and optional comment. This is for informational purposes only
Task action
```````````
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.
Notify statements
`````````````````
Nearly all modules are written to be 'idempotent' and can signal when they have affected a change
on the remote system. If a notify statement is used, the named handler will be run against
each system where a change was effected, but NOT on systems where no change occurred.
Handlers
````````
Handlers are lists of tasks, not really any different from regular tasks, that are referenced
by name.
Includes
````````
Not all tasks have to be listed directly in the main file. An include file can contain
a list of tasks (in YAML) as well, optionally passing extra variables into the file.
Variables passed in can be deferenced like this:
{{ variable }}
Asynchronous Actions and Polling
````````````````````````````````
(Information on this feature is pending)
Executing A Playbook
````````````````````
To run a playbook::
ansible-playbook playbook.yml
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -79,6 +79,14 @@ div.sphinxsidebar input {
font-size: 1em;
}
div.sphinxsidebar input[type="text"] {
width: 170px;
}
div.sphinxsidebar input[type="submit"] {
width: 30px;
}
img {
border: 0;
}
@ -236,7 +244,6 @@ img.align-center, .figure.align-center, object.align-center {
}
.align-center {
clear: both;
text-align: center;
}

View file

@ -363,10 +363,13 @@ var Search = {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
match = objects[prefix][name];
descr = objnames[match[1]] + _(', in ') + titles[match[0]];
// XXX the generated anchors are not generally correct
// XXX there may be custom prefixes
result = [filenames[match[0]], fullname, '#'+fullname, descr];
descr = objnames[match[1]][2] + _(', in ') + titles[match[0]];
anchor = match[3];
if (anchor == '')
anchor = fullname;
else if (anchor == '-')
anchor = objnames[match[1]][1] + '-' + fullname;
result = [filenames[match[0]], fullname, '#'+anchor, descr];
switch (match[2]) {
case 1: objectResults.push(result); break;
case 0: importantResults.push(result); break;
@ -489,7 +492,7 @@ var Search = {
listItem.slideDown(5, function() {
displayNextItem();
});
});
}, "text");
} else {
// no source available, just display title
Search.output.append(listItem);

View file

@ -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" href="communicate.html" />
<link rel="next" title="Communicate and Get Involved" href="communicate.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"
<a href="communicate.html" title="Communicate and Get Involved"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="examples.html" title="Examples"
@ -50,54 +50,34 @@
<div class="section" id="api">
<h1>API<a class="headerlink" href="#api" title="Permalink to this headline"></a></h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.</p>
<p>Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.</p>
<p>Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.</p>
<p>In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.</p>
<p>Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.</p>
<p>The Python API is very powerful, and is how the ansible CLI and ansible-playbook
are implemented.</p>
<p>It&#8217;s pretty simple:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">ansible.runner</span>
<span class="n">runner</span> <span class="o">=</span> <span class="n">ansible</span><span class="o">.</span><span class="n">runner</span><span class="o">.</span><span class="n">Runner</span><span class="p">(</span>
<span class="n">module_name</span><span class="o">=</span><span class="s">&#39;ping&#39;</span><span class="p">,</span>
<span class="n">module_args</span><span class="o">=</span><span class="s">&#39;&#39;</span><span class="p">,</span>
<span class="n">pattern</span><span class="o">=</span><span class="s">&#39;web*&#39;</span><span class="p">,</span>
<span class="n">forks</span><span class="o">=</span><span class="mi">10</span>
<span class="p">)</span>
<span class="n">datastructure</span> <span class="o">=</span> <span class="n">runner</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
</pre></div>
</div>
<p>The run method returns results per host, grouped by whether they
could be contacted or not. Return types are module specific, as
expressed in the &#8216;ansible-modules&#8217; documentation.:</p>
<div class="highlight-python"><pre>{
"dark" : {
"web1.example.com" : "failure message"
}
"contacted" : {
"web2.example.com" : 1
}
}</pre>
</div>
<p>A module can return any type of JSON data it wants, so Ansible can
be used as a framework to rapidly build powerful applications and scripts.</p>
</div>
@ -111,7 +91,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
title="previous chapter">Examples</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="communicate.html"
title="next chapter">Communicate</a></p>
title="next chapter">Communicate and Get Involved</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/api.txt"
@ -120,7 +100,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -141,7 +121,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="communicate.html" title="Communicate"
<a href="communicate.html" title="Communicate and Get Involved"
>next</a> |</li>
<li class="right" >
<a href="examples.html" title="Examples"
@ -151,8 +131,8 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Communicate &mdash; Ansible v0.0.1 documentation</title>
<title>Communicate and Get Involved &mdash; 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,56 +48,16 @@
<div class="bodywrapper">
<div class="body">
<div class="section" id="communicate">
<h1>Communicate<a class="headerlink" href="#communicate" title="Permalink to this headline"></a></h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.</p>
<p>Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.</p>
<p>Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.</p>
<p>In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.</p>
<p>Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.</p>
<div class="section" id="communicate-and-get-involved">
<h1>Communicate and Get Involved<a class="headerlink" href="#communicate-and-get-involved" title="Permalink to this headline"></a></h1>
<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>
@ -120,7 +80,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -151,8 +111,8 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -50,68 +50,53 @@
<div class="section" id="examples">
<h1>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h1>
<div class="section" id="examples-1">
<h2>Examples 1<a class="headerlink" href="#examples-1" title="Permalink to this headline"></a></h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.</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="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>
<dd>Alternative ways to use ansible</dd>
</dl>
</div>
<div class="section" id="examples-2">
<h2>Examples 2<a class="headerlink" href="#examples-2" title="Permalink to this headline"></a></h2>
<p>Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.</p>
<div class="section" id="parallelism-and-shell-commands">
<h2>Parallelism and Shell Commands<a class="headerlink" href="#parallelism-and-shell-commands" title="Permalink to this headline"></a></h2>
<p>Reboot all web servers in Atlanta, 10 at a time:</p>
<div class="highlight-python"><pre>ssh-agent bash
ssh-add ~/.ssh/id_rsa.pub
ansible atlanta -a "/sbin/reboot" -f 10</pre>
</div>
<div class="section" id="examples-3">
<h2>Examples 3<a class="headerlink" href="#examples-3" title="Permalink to this headline"></a></h2>
<p>Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.</p>
<p>The -f 10 specifies the usage of 10 simultaneous processes.</p>
<p>Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there.</p>
</div>
<div class="section" id="id1">
<h2>Examples 3<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<p>In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.</p>
<div class="section" id="example-2-time-limited-background-operations">
<h2>Example 2: Time Limited Background Operations<a class="headerlink" href="#example-2-time-limited-background-operations" title="Permalink to this headline"></a></h2>
<p>Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won&#8217;t lose track. Polling support is pending in the command line.:</p>
<div class="highlight-python"><pre>ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff"
ansible all -n job_status -a jid=123456789</pre>
</div>
<div class="section" id="examples-4">
<h2>Examples 4<a class="headerlink" href="#examples-4" title="Permalink to this headline"></a></h2>
<p>Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.</p>
<p>Any module other than &#8216;copy&#8217; or &#8216;template&#8217; can be backgrounded.</p>
</div>
<div class="section" id="examples-3-file-transfer-templating">
<h2>Examples 3: File Transfer &amp; Templating<a class="headerlink" href="#examples-3-file-transfer-templating" title="Permalink to this headline"></a></h2>
<p>Ansible can SCP lots of files to multiple machines in parallel, and optionally use them as template sources.</p>
<p>To just transfer a file directly to many different servers:</p>
<div class="highlight-python"><pre>ansible atlanta copy -a "/etc/hosts /tmp/hosts"</pre>
</div>
<p>To use templating, first run the setup module to put the template variables you would like to use on the remote host. Then use the template module to write the files using the templates. Templates are written in Jinja2 format. Playbooks (covered below) will run the setup module for you, making this even simpler.:</p>
<div class="highlight-python"><pre>ansible webservers -m setup -a "favcolor=red ntp_server=192.168.1.1"
ansible webservers -m template -a "src=/srv/motd.j2 dest=/etc/motd"
ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"</pre>
</div>
<p>Need something like the fqdn in a template? If facter or ohai are installed, data from these projects will also be made available to the template engine, using &#8216;facter&#8217; and &#8216;ohai&#8217; prefixes for each.</p>
</div>
<div class="section" id="examples-3-deploying-from-source-control">
<h2>Examples 3: Deploying From Source Control<a class="headerlink" href="#examples-3-deploying-from-source-control" title="Permalink to this headline"></a></h2>
<p>Deploy your webapp straight from git:</p>
<div class="highlight-python"><pre>ansible webservers -m git -a "repo=git://foo dest=/srv/myapp version=HEAD"</pre>
</div>
<p>Since ansible modules can notify change handlers (see &#8216;Playbooks&#8217;) it is possible to tell ansible to run specific tasks when the code is updated, such as deploying Perl/Python/PHP/Ruby directly from git and then restarting apache.</p>
</div>
</div>
@ -124,11 +109,10 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Examples</a><ul>
<li><a class="reference internal" href="#examples-1">Examples 1</a></li>
<li><a class="reference internal" href="#examples-2">Examples 2</a></li>
<li><a class="reference internal" href="#examples-3">Examples 3</a></li>
<li><a class="reference internal" href="#id1">Examples 3</a></li>
<li><a class="reference internal" href="#examples-4">Examples 4</a></li>
<li><a class="reference internal" href="#parallelism-and-shell-commands">Parallelism and Shell Commands</a></li>
<li><a class="reference internal" href="#example-2-time-limited-background-operations">Example 2: Time Limited Background Operations</a></li>
<li><a class="reference internal" href="#examples-3-file-transfer-templating">Examples 3: File Transfer &amp; Templating</a></li>
<li><a class="reference internal" href="#examples-3-deploying-from-source-control">Examples 3: Deploying From Source Control</a></li>
</ul>
</li>
</ul>
@ -147,7 +131,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -178,8 +162,8 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -59,7 +59,7 @@
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -84,8 +84,8 @@
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -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="YAML Scripts" href="YAMLScripts.html" />
<link rel="next" title="Patterns" 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="YAMLScripts.html" title="YAML Scripts"
<a href="patterns.html" title="Patterns"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Ansible"
@ -50,64 +50,94 @@
<div class="section" id="getting-started">
<h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1>
<p>How to ansible</p>
<p>How to download ansible and get started using it</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="YAMLScripts.html"><em>YAML Scripts</em></a></dt>
<dd>Complete documentation of the YAML syntax <cite>ansible</cite> understands.</dd>
<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>
<dd>Learning ansible&#8217;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>
</dl>
</div>
<div class="section" id="what-you-need">
<h2>What you need<a class="headerlink" href="#what-you-need" title="Permalink to this headline"></a></h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.</p>
<p>Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.</p>
<p>Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.</p>
<p>In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.</p>
<p>Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.</p>
<div class="section" id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<p>Requirements are extremely minimal.</p>
<p>If you are running python 2.6 on the <strong>overlord</strong> machine, you will
need:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">paramiko</span></tt></li>
<li><tt class="docutils literal"><span class="pre">PyYAML</span></tt></li>
<li><tt class="docutils literal"><span class="pre">python-jinja2</span></tt> (for playbooks)</li>
</ul>
<p>If you are running less than Python 2.6, you will also need:</p>
<ul class="simple">
<li>The Python 2.4 or 2.5 backport of the <tt class="docutils literal"><span class="pre">multiprocessing</span></tt> module<ul>
<li><a class="reference external" href="http://code.google.com/p/python-multiprocessing/wiki/Install">Installation and Testing Instructions</a></li>
</ul>
</li>
<li><tt class="docutils literal"><span class="pre">simplejson</span></tt></li>
</ul>
<p>On the managed nodes, to use templating, you will need:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">python-jinja2</span></tt> (you can install this with ansible)</li>
</ul>
</div>
<div class="section" id="developer-requirements">
<h2>Developer Requirements<a class="headerlink" href="#developer-requirements" title="Permalink to this headline"></a></h2>
<p>For developers, you may wish to have:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">asciidoc</span></tt> (for building manpage documentation)</li>
<li><tt class="docutils literal"><span class="pre">python-sphinx</span></tt> (for building content for ansible.github.com)</li>
</ul>
</div>
<div class="section" id="getting-ansible">
<h2>Getting Ansible<a class="headerlink" href="#getting-ansible" title="Permalink to this headline"></a></h2>
<p>Tagged releases are available as tar.gz files from the Ansible github
project page:</p>
<ul class="simple">
<li><a class="reference external" href="https://github.com/ansible/ansible/downloads">Ansible/downloads</a></li>
</ul>
<p>You can also clone the git repository yourself and install Ansible in
one of two ways:</p>
<div class="section" id="python-distutils">
<h3>Python Distutils<a class="headerlink" href="#python-distutils" title="Permalink to this headline"></a></h3>
<p>You can also install Ansible using Python Distutils:</p>
<div class="highlight-python"><pre>$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ sudo make install</pre>
</div>
</div>
<div class="section" id="via-rpm">
<h3>Via RPM<a class="headerlink" href="#via-rpm" title="Permalink to this headline"></a></h3>
<p>In the near future, pre-built RPMs will be available through your distribution. Until that time you
can use the <tt class="docutils literal"><span class="pre">make</span> <span class="pre">rpm</span></tt> command:</p>
<div class="highlight-python"><pre>$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ make rpm
$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm</pre>
</div>
</div>
</div>
<div class="section" id="your-first-commands">
<h2>Your first commands<a class="headerlink" href="#your-first-commands" title="Permalink to this headline"></a></h2>
<p>Edit /etc/ansible/hosts and put one or more remote systems in it, for which you have your SSH
key in <tt class="docutils literal"><span class="pre">authorized_keys</span></tt>:</p>
<div class="highlight-python"><pre>192.168.1.50
aserver.example.org
bserver.example.org</pre>
</div>
<p>Now try this:</p>
<blockquote>
<div>ssh-agent bash
ssh-add ~/.ssh/id_rsa
ansible all -m ping</div></blockquote>
<p>Congratulations. You&#8217;ve just contacted your nodes with Ansible. It&#8217;s now time to read some
of the more real-world examples.</p>
</div>
</div>
@ -120,7 +150,14 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Getting Started</a><ul>
<li><a class="reference internal" href="#what-you-need">What you need</a></li>
<li><a class="reference internal" href="#requirements">Requirements</a></li>
<li><a class="reference internal" href="#developer-requirements">Developer Requirements</a></li>
<li><a class="reference internal" href="#getting-ansible">Getting Ansible</a><ul>
<li><a class="reference internal" href="#python-distutils">Python Distutils</a></li>
<li><a class="reference internal" href="#via-rpm">Via RPM</a></li>
</ul>
</li>
<li><a class="reference internal" href="#your-first-commands">Your first commands</a></li>
</ul>
</li>
</ul>
@ -129,8 +166,8 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<p class="topless"><a href="index.html"
title="previous chapter">Ansible</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="YAMLScripts.html"
title="next chapter">YAML Scripts</a></p>
<p class="topless"><a href="patterns.html"
title="next chapter">Patterns</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/gettingstarted.txt"
@ -139,7 +176,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -160,7 +197,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="YAMLScripts.html" title="YAML Scripts"
<a href="patterns.html" title="Patterns"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Ansible"
@ -170,8 +207,8 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -46,32 +46,25 @@
<div class="section" id="ansible">
<h1>Ansible<a class="headerlink" href="#ansible" title="Permalink to this headline"></a></h1>
<p>Ansible is a extra-simple tool/API for doing &#8216;parallel remote things&#8217;
over SSH &#8211; whether executing commands, running &#8220;modules&#8221;, or
executing larger &#8216;playbooks&#8217; that can serve as a configuration
management or deployment system.</p>
<p>While <a class="reference external" href="http://fedorahosted.org/func">Func installation</a> which I
co-wrote, aspired to avoid using SSH and have it&#8217;s own daemon
infrastructure, Ansible aspires to be quite different and more
minimal, but still able to grow more modularly over time. This is
based on talking to a lot of users of various tools and wishing to
eliminate problems with connectivity and long running daemons, or not
picking tool <cite>X</cite> because they preferred to code in <cite>Y</cite>. Further,
playbooks take things a whole step further, building the config and
deployment system I always wanted to build.</p>
<p>Why use Ansible versus something else? (Fabric, Capistrano,
<p>Ansible is a radically simple deployment, configuration, and command execution framework.
Other tools in this space have been too complicated for too long, require too much bootstrapping,
and have too much learning curve. Ansible is dead simple and painless to extend. For comparison, Puppet and Chef have about 60k lines of code. Ansible&#8217;s core is a little over 1000 lines.</p>
<p>Ansible isn&#8217;t just for configuration &#8211; it&#8217;s also great for Ad-Hoc tasks,
quickly firing off commands against nodes. Where Ansible excels though, is expressing complex multi-node deployment processes, executing complex sequences of commands on different hosts through the &#8220;playbooks&#8221; feature.</p>
<p>Ansible does not require programming in any particular language &#8211; you can write modules
as scripts or programs that return simple JSON.</p>
<p>Why use Ansible versus something else? (Puppet, Chef, Fabric, Capistrano,
mCollective, Func, SaltStack, etc?) It will have far less code, it
will be more correct, and it will be the easiest thing to hack on and
use you&#8217;ll ever see &#8211; regardless of your favorite language of choice.
Want to only code plugins in bash or clojure? Ansible doesn&#8217;t care.
The docs will fit on one page and the source will be blindingly
obvious.</p>
<div class="section" id="design-principles">
<h2>Design Principles<a class="headerlink" href="#design-principles" title="Permalink to this headline"></a></h2>
Systems management doesn&#8217;t have to be complicated. Ansible&#8217;s docs will remain
short &amp; simple, and the source will be blindingly obvious.</p>
<div class="section" id="design-goals">
<h2>Design Goals<a class="headerlink" href="#design-goals" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Dead simple setup</li>
<li>Super fast &amp; parallel by default</li>
<li>No server or client daemons; use existing SSHd</li>
<li>No server or client daemons; use existing SSHd out of the box</li>
<li>No additional software required on client boxes</li>
<li>Modules can be written in ANY language</li>
<li>Awesome API for creating very powerful distributed scripts</li>
@ -79,57 +72,16 @@ obvious.</p>
<li>Create the easiest config management system to use, ever.</li>
</ul>
</div>
<div class="section" id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<p>Requirements are extremely minimal.</p>
<p>If you are running python 2.6 on the <strong>overlord</strong> machine, you will
need:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">paramiko</span></tt></li>
<li><tt class="docutils literal"><span class="pre">PyYAML</span></tt></li>
<li><tt class="docutils literal"><span class="pre">python-jinja2</span></tt> (for playbooks)</li>
<li><tt class="docutils literal"><span class="pre">Asciidoc</span></tt> (for building documentation)</li>
</ul>
<p>If you are running less than Python 2.6, you will also need:</p>
<ul class="simple">
<li>The Python 2.4 or 2.5 backport of the <tt class="docutils literal"><span class="pre">multiprocessing</span></tt> module<ul>
<li><a class="reference external" href="http://code.google.com/p/python-multiprocessing/wiki/Install">Installation and Testing Instructions</a></li>
</ul>
</li>
<li><tt class="docutils literal"><span class="pre">simplejson</span></tt></li>
</ul>
<p>On the managed nodes, to use templating, you will need:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">python-jinja2</span></tt> (you can install this with ansible)</li>
</ul>
</div>
<div class="section" id="getting-ansible">
<h2>Getting Ansible<a class="headerlink" href="#getting-ansible" title="Permalink to this headline"></a></h2>
<p>Tagged releases are available as tar.gz files from the Ansible github
project page:</p>
<ul class="simple">
<li><a class="reference external" href="https://github.com/ansible/ansible/downloads">Ansible/downloads</a></li>
</ul>
<p>You can also clone the git repository yourself and install Ansible in
one of two ways:</p>
<div class="section" id="python-distutils">
<h3>Python Distutils<a class="headerlink" href="#python-distutils" title="Permalink to this headline"></a></h3>
<p>You can install Ansible using Python Distutils:</p>
<div class="highlight-python"><pre>$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ sudo make install</pre>
</div>
</div>
<div class="section" id="via-rpm">
<h3>Via RPM<a class="headerlink" href="#via-rpm" title="Permalink to this headline"></a></h3>
<p>In the future, pre-built RPMs may be available. Until that time you
can use the <tt class="docutils literal"><span class="pre">make</span> <span class="pre">rpm</span></tt> command:</p>
<div class="highlight-python"><pre>$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ make rpm
$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm</pre>
</div>
</div>
<div class="section" id="about-the-author">
<h2>About the Author<a class="headerlink" href="#about-the-author" title="Permalink to this headline"></a></h2>
<p>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.</p>
<p>Ansible is an GPLv3 licensed open source project, so see the contributions section for how to
get involved.</p>
</div>
</div>
<div class="section" id="contents">
@ -137,45 +89,74 @@ $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm</pre>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="gettingstarted.html">Getting Started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gettingstarted.html#what-you-need">What you need</a></li>
<li class="toctree-l2"><a class="reference internal" href="gettingstarted.html#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="gettingstarted.html#developer-requirements">Developer Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="gettingstarted.html#getting-ansible">Getting Ansible</a><ul>
<li class="toctree-l3"><a class="reference internal" href="gettingstarted.html#python-distutils">Python Distutils</a></li>
<li class="toctree-l3"><a class="reference internal" href="gettingstarted.html#via-rpm">Via RPM</a></li>
</ul>
</li>
<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>
</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#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>
<li class="toctree-l2"><a class="reference internal" href="modules.html#git">git</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#ohai">ohai</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#ping">ping</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#service">service</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#setup">setup</a></li>
<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>
</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="patterns.html">Patterns</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="playbooks.html">Playbooks</a></li>
<li class="toctree-l1"><a class="reference internal" href="playbooks.html">Playbooks</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#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>
<li class="toctree-l2"><a class="reference internal" href="playbooks.html#asynchronous-actions-and-polling">Asynchronous Actions and Polling</a></li>
<li class="toctree-l2"><a class="reference internal" href="playbooks.html#executing-a-playbook">Executing A Playbook</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a><ul>
<li class="toctree-l2"><a class="reference internal" href="examples.html#examples-1">Examples 1</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#examples-2">Examples 2</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#examples-3">Examples 3</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#id1">Examples 3</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#examples-4">Examples 4</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#parallelism-and-shell-commands">Parallelism and Shell Commands</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#example-2-time-limited-background-operations">Example 2: Time Limited Background Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#examples-3-file-transfer-templating">Examples 3: File Transfer &amp; Templating</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#examples-3-deploying-from-source-control">Examples 3: Deploying From Source Control</a></li>
</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</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>
<li class="toctree-l2"><a class="reference internal" href="man.html#ansible-modules-5">ansible-modules(5)</a></li>
<li class="toctree-l2"><a class="reference internal" href="man.html#ansible-playbook-5">ansible-playbook(5)</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="communicate-or-get-involved">
<h1>Communicate or Get Involved<a class="headerlink" href="#communicate-or-get-involved" title="Permalink to this headline"></a></h1>
<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>
@ -187,19 +168,13 @@ $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm</pre>
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Ansible</a><ul>
<li><a class="reference internal" href="#design-principles">Design Principles</a></li>
<li><a class="reference internal" href="#requirements">Requirements</a></li>
<li><a class="reference internal" href="#getting-ansible">Getting Ansible</a><ul>
<li><a class="reference internal" href="#python-distutils">Python Distutils</a></li>
<li><a class="reference internal" href="#via-rpm">Via RPM</a></li>
</ul>
</li>
<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>
</ul>
</li>
<li><a class="reference internal" href="#contents">Contents</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#communicate-or-get-involved">Communicate or Get Involved</a></li>
</ul>
<h4>Next topic</h4>
@ -213,7 +188,7 @@ $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm</pre>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -241,8 +216,8 @@ $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm</pre>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -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" href="communicate.html" />
<link rel="prev" title="Communicate and Get Involved" href="communicate.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"
<a href="communicate.html" title="Communicate and Get Involved"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
@ -46,25 +46,13 @@
<div class="section" id="man-pages">
<span id="man"></span><h1>Man Pages<a class="headerlink" href="#man-pages" title="Permalink to this headline"></a></h1>
<p>Ansile ships with a handfull of manpages to help you on your journey.</p>
<p>Ansible&#8217;s manpage lists available command line options.</p>
<div class="section" id="ansible-1">
<h2>ansible(1)<a class="headerlink" href="#ansible-1" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference external" href="man/ansible.1.html">View ansible.1</a></li>
</ul>
</div>
<div class="section" id="ansible-modules-5">
<h2>ansible-modules(5)<a class="headerlink" href="#ansible-modules-5" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference external" href="man/ansible-modules.5.html">View ansible-modules.5</a></li>
</ul>
</div>
<div class="section" id="ansible-playbook-5">
<h2>ansible-playbook(5)<a class="headerlink" href="#ansible-playbook-5" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference external" href="man/ansible-playbook.5.html">View ansible-playbook.5</a></li>
</ul>
</div>
</div>
@ -77,15 +65,13 @@
<ul>
<li><a class="reference internal" href="#">Man Pages</a><ul>
<li><a class="reference internal" href="#ansible-1">ansible(1)</a></li>
<li><a class="reference internal" href="#ansible-modules-5">ansible-modules(5)</a></li>
<li><a class="reference internal" href="#ansible-playbook-5">ansible-playbook(5)</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="communicate.html"
title="previous chapter">Communicate</a></p>
title="previous chapter">Communicate and Get Involved</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/man.txt"
@ -94,7 +80,7 @@
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -115,15 +101,15 @@
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="communicate.html" title="Communicate"
<a href="communicate.html" title="Communicate and Get Involved"
>previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -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" type="text/css" href="./docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /></head><body><div xml:lang="en" class="refentry" title="ansible-modules" lang="en"><a id="id327073"></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="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
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.

View file

@ -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" type="text/css" href="./docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /></head><body><div xml:lang="en" class="refentry" title="ansible-modules" lang="en"><a id="id458930"></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="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.
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>

View file

@ -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" type="text/css" href="./docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /></head><body><div xml:lang="en" class="refentry" title="ansible" lang="en"><a id="id355813"></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 &lt;host-pattern&gt; [-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="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 &lt;host-pattern&gt; [-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>

View file

@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Modules &mdash; Ansible v0.0.1 documentation</title>
<title>Ansible Modules &mdash; 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">
@ -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="YAML Scripts" href="YAMLScripts.html" />
<link rel="prev" title="Patterns" href="patterns.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="YAMLScripts.html" title="YAML Scripts"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="patterns.html" title="Patterns"
@ -48,56 +48,139 @@
<div class="bodywrapper">
<div class="body">
<div class="section" id="modules">
<h1>Modules<a class="headerlink" href="#modules" title="Permalink to this headline"></a></h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.</p>
<p>Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.</p>
<p>Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.</p>
<p>In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.</p>
<p>Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.</p>
<div class="section" id="ansible-modules">
<h1>Ansible Modules<a class="headerlink" href="#ansible-modules" 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">
<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>
<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>
<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>
</div>
<div class="section" id="command">
<h2>command<a class="headerlink" href="#command" title="Permalink to this headline"></a></h2>
<p>The command module takes the command name followed by a list of arguments, space delimited.
This is the only module that does not use key=value style parameters.</p>
<p>Example usage:</p>
<div class="highlight-python"><pre>/sbin/shutdown -t now</pre>
</div>
<p>This module does not support change hooks and returns the return code from the program as well as timing information about how long the command was running for.</p>
</div>
<div class="section" id="copy">
<h2>copy<a class="headerlink" href="#copy" title="Permalink to this headline"></a></h2>
<p>The copy module moves a file on the local box to remote locations.</p>
<p><em>src</em>:</p>
<p>Local absolute path to a file to copy to the remote server</p>
<p><em>dest</em>:</p>
<p>Remote absolute path where the file should end up</p>
<p>This module also returns md5sum information about the resultant file.</p>
</div>
<div class="section" id="facter">
<h2>facter<a class="headerlink" href="#facter" title="Permalink to this headline"></a></h2>
<p>Runs the discovery program &#8216;facter&#8217; on the remote system, returning
JSON data that can be useful for inventory purposes.</p>
<p>Requires that &#8216;facter&#8217; and &#8216;ruby-json&#8217; be installed on the remote end.</p>
<p>This module is informative only - it takes no parameters &amp; does not support change hooks,
nor does it make any changes on the system.</p>
</div>
<div class="section" id="git">
<h2>git<a class="headerlink" href="#git" title="Permalink to this headline"></a></h2>
<p>Deploys software from git checkouts.</p>
<p><em>repo</em>:</p>
<p>git or http protocol address of the repo to checkout</p>
<p><em>dest</em>:</p>
<p>where to check it out, an absolute directory path</p>
<p><em>version</em>:</p>
<p>what version to check out &#8211; either the git SHA, the literal string &#8216;HEAD&#8217;, or a tag name</p>
</div>
<div class="section" id="ohai">
<h2>ohai<a class="headerlink" href="#ohai" title="Permalink to this headline"></a></h2>
<p>Similar to the facter module, this returns JSON inventory data. Ohai
data is a bit more verbose and nested than facter.</p>
<p>Requires that &#8216;ohai&#8217; be installed on the remote end.</p>
<p>This module is information only - it takes no parameters &amp; does not
support change hooks, nor does it make any changes on the system.</p>
</div>
<div class="section" id="ping">
<h2>ping<a class="headerlink" href="#ping" title="Permalink to this headline"></a></h2>
<p>A trivial test module, this module always returns the integer &#8216;1&#8217; on
successful contact.</p>
<p>This module does not support change hooks.</p>
<p>This module is informative only - it takes no parameters &amp; does not
support change hooks, nor does it make any changes on the system.</p>
</div>
<div class="section" id="service">
<h2>service<a class="headerlink" href="#service" title="Permalink to this headline"></a></h2>
<p>Controls services on remote machines.</p>
<p><em>state</em></p>
<p>Values are &#8216;started&#8217;, &#8216;stopped&#8217;, or &#8216;restarted&#8217;. Started/stopped
are idempotent actions that will not run commands unless neccessary.
&#8216;restarted&#8217; will always bounce the service</p>
<p><em>name</em></p>
<p>The name of the service</p>
</div>
<div class="section" id="setup">
<h2>setup<a class="headerlink" href="#setup" title="Permalink to this headline"></a></h2>
<p>Writes a JSON file containing key/value data, for use in templating.
Call this once before using the template modules. Playbooks will
execute this module automatically as the first step in each play.</p>
<p>If facter or ohai are installed, variables from these programs will also
be snapshotted into the JSON file for usage in templating. These variables
are prefixed with &#8216;<a class="reference internal" href="#facter">facter</a>&#8216; and &#8216;<a class="reference internal" href="#ohai">ohai</a>&#8221; so it&#8217;s easy to tell their source.</p>
<p><em>metadata</em></p>
<p>Optionally overrides the default JSON file location of /etc/ansible/setup or ~/ansible/setup
depending on what remote user has been specified.</p>
<p>If used, also supply the metadata parameter to the template module.</p>
<p><em>anything</em></p>
<p>any other parameters can be named basically anything, and set a key=value
pair in the JSON file for use in templating.</p>
</div>
<div class="section" id="template">
<h2>template<a class="headerlink" href="#template" title="Permalink to this headline"></a></h2>
<p>Templates a file out to a remote server. Call the setup module prior to usage.</p>
<p><em>src</em></p>
<p>path of a Jinja2 formatted template on the local server</p>
<p><em>dest</em></p>
<p>location to render the template on the remote server</p>
<p><em>metadata</em></p>
<p>location of a JSON file to use to supply template data. Default is /etc/ansible/setup
which is the same as the default for the setup module. Change if running as a non-root
remote user who does not have permissions on /etc/ansible.</p>
<p>This module also returns md5sum information about the resultant file.</p>
</div>
<div class="section" id="user">
<h2>user<a class="headerlink" href="#user" title="Permalink to this headline"></a></h2>
<p>This module is in plan.</p>
</div>
<div class="section" id="yum">
<h2>yum<a class="headerlink" href="#yum" title="Permalink to this headline"></a></h2>
<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>
<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.
To support change hooks, modules should return hashes with a changed: True/False
element at the top level. Modules can also choose to indicate a failure scenario
by returning a top level &#8216;failure&#8217; element with a True value, and a &#8216;msg&#8217; element
describing the nature of the failure. Other values are up to the module.</p>
</div>
</div>
@ -106,12 +189,33 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<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="#command">command</a></li>
<li><a class="reference internal" href="#copy">copy</a></li>
<li><a class="reference internal" href="#facter">facter</a></li>
<li><a class="reference internal" href="#git">git</a></li>
<li><a class="reference internal" href="#ohai">ohai</a></li>
<li><a class="reference internal" href="#ping">ping</a></li>
<li><a class="reference internal" href="#service">service</a></li>
<li><a class="reference internal" href="#setup">setup</a></li>
<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>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="patterns.html"
title="previous chapter">Patterns</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="playbooks.html"
title="next chapter">Playbooks</a></p>
<p class="topless"><a href="YAMLScripts.html"
title="next chapter">YAML Scripts</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/modules.txt"
@ -120,7 +224,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -141,7 +245,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="playbooks.html" title="Playbooks"
<a href="YAMLScripts.html" title="YAML Scripts"
>next</a> |</li>
<li class="right" >
<a href="patterns.html" title="Patterns"
@ -151,8 +255,8 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -23,8 +23,8 @@
<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="Modules" href="modules.html" />
<link rel="prev" title="YAML Scripts" href="YAMLScripts.html" />
<link rel="next" title="Ansible Modules" href="modules.html" />
<link rel="prev" title="Getting Started" href="gettingstarted.html" />
</head>
<body>
<div class="related">
@ -34,10 +34,10 @@
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modules.html" title="Modules"
<a href="modules.html" title="Ansible Modules"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="YAMLScripts.html" title="YAML Scripts"
<a href="gettingstarted.html" title="Getting Started"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
@ -50,54 +50,64 @@
<div class="section" id="patterns">
<h1>Patterns<a class="headerlink" href="#patterns" title="Permalink to this headline"></a></h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.</p>
<p>Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.</p>
<p>Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.</p>
<p>In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.</p>
<p>Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.</p>
<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>
<dd>Learning ansible&#8217;s configuration management language</dd>
</dl>
</div>
<p>Ansible works against multiple systems in your infrastructure at the
same time. It does this by selecting portions of systems listed in Ansible&#8217;s inventory file,
which defaults to /etc/ansible/hosts, and looks like this:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">mail</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="p">[</span><span class="n">webservers</span><span class="p">]</span>
<span class="n">foo</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="n">bar</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="p">[</span><span class="n">dbservers</span><span class="p">]</span>
<span class="n">one</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="n">two</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<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 &#8216;all&#8217; or &#8216;*&#8217; 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>
<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 &#8216;ungrouped&#8217; which selects systems not in a group.</p>
</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>
</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>
</div>
</div>
@ -106,12 +116,24 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="sphinxsidebar">
<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>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="YAMLScripts.html"
title="previous chapter">YAML Scripts</a></p>
<p class="topless"><a href="gettingstarted.html"
title="previous chapter">Getting Started</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="modules.html"
title="next chapter">Modules</a></p>
title="next chapter">Ansible Modules</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/patterns.txt"
@ -120,7 +142,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -141,18 +163,18 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="modules.html" title="Modules"
<a href="modules.html" title="Ansible Modules"
>next</a> |</li>
<li class="right" >
<a href="YAMLScripts.html" title="YAML Scripts"
<a href="gettingstarted.html" title="Getting Started"
>previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -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="Examples" href="examples.html" />
<link rel="prev" title="Modules" href="modules.html" />
<link rel="prev" title="YAML Scripts" href="YAMLScripts.html" />
</head>
<body>
<div class="related">
@ -37,7 +37,7 @@
<a href="examples.html" title="Examples"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="modules.html" title="Modules"
<a href="YAMLScripts.html" title="YAML Scripts"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
@ -50,54 +50,118 @@
<div class="section" id="playbooks">
<h1>Playbooks<a class="headerlink" href="#playbooks" title="Permalink to this headline"></a></h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.</p>
<p>Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.</p>
<p>Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.</p>
<p>In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.</p>
<p>Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.</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="YAMLScripts.html"><em>YAML Scripts</em></a></dt>
<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>
<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>
<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
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>
</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>
</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 &#8216;action&#8217; lines of the template, or in
included templates. Variables are deferenced 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>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 &#8216;facter&#8217;
and Ohai variables are prefixed with &#8216;ohai&#8217;.</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>
</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>
<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>
</div>
<div class="section" id="notify-statements">
<h2>Notify statements<a class="headerlink" href="#notify-statements" title="Permalink to this headline"></a></h2>
<p>Nearly all modules are written to be &#8216;idempotent&#8217; and can signal when they have affected a change
on the remote system. If a notify statement is used, the named handler will be run against
each system where a change was effected, but NOT on systems where no change occurred.</p>
</div>
<div class="section" id="handlers">
<h2>Handlers<a class="headerlink" href="#handlers" title="Permalink to this headline"></a></h2>
<p>Handlers are lists of tasks, not really any different from regular tasks, that are referenced
by name.</p>
</div>
<div class="section" id="includes">
<h2>Includes<a class="headerlink" href="#includes" title="Permalink to this headline"></a></h2>
<p>Not all tasks have to be listed directly in the main file. An include file can contain
a list of tasks (in YAML) as well, optionally passing extra variables into the file.
Variables passed in can be deferenced like this:</p>
<blockquote>
<div>{{ variable }}</div></blockquote>
</div>
<div class="section" id="asynchronous-actions-and-polling">
<h2>Asynchronous Actions and Polling<a class="headerlink" href="#asynchronous-actions-and-polling" title="Permalink to this headline"></a></h2>
<p>(Information on this feature is pending)</p>
</div>
<div class="section" id="executing-a-playbook">
<h2>Executing A Playbook<a class="headerlink" href="#executing-a-playbook" title="Permalink to this headline"></a></h2>
<p>To run a playbook:</p>
<div class="highlight-python"><pre>ansible-playbook playbook.yml</pre>
</div>
</div>
</div>
@ -106,9 +170,27 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
</div>
<div class="sphinxsidebar">
<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="#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="#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>
<li><a class="reference internal" href="#asynchronous-actions-and-polling">Asynchronous Actions and Polling</a></li>
<li><a class="reference internal" href="#executing-a-playbook">Executing A Playbook</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="modules.html"
title="previous chapter">Modules</a></p>
<p class="topless"><a href="YAMLScripts.html"
title="previous chapter">YAML Scripts</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="examples.html"
title="next chapter">Examples</a></p>
@ -120,7 +202,7 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
@ -144,15 +226,15 @@ hendrerit mi tincidunt dui fermentum placerat.</p>
<a href="examples.html" title="Examples"
>next</a> |</li>
<li class="right" >
<a href="modules.html" title="Modules"
<a href="YAMLScripts.html" title="YAML Scripts"
>previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

View file

@ -90,8 +90,8 @@
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
Last updated on Mar 07, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1,8 +1,9 @@
YAML Scripts
============
This page provides a basic overview of correct YAML syntax.
This page provides a basic overview of correct YAML syntax, which is how Ansible
playbooks (our configuration management language) are expressed.
You may also wish to read playbook examples and will quickly pick this up from those.
YAML Basics
-----------
@ -74,7 +75,7 @@ Finally, you can combine these data structures::
dotnet: Lame
That's all you really need to know about YAML to get started writing
`Ansible` scripts.
`Ansible` playbooks.
.. seealso::

View file

@ -1,55 +1,35 @@
API
===
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
The Python API is very powerful, and is how the ansible CLI and ansible-playbook
are implemented.
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
It's pretty simple::
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
import ansible.runner
runner = ansible.runner.Runner(
module_name='ping',
module_args='',
pattern='web*',
forks=10
)
datastructure = runner.run()
The run method returns results per host, grouped by whether they
could be contacted or not. Return types are module specific, as
expressed in the 'ansible-modules' documentation.::
{
"dark" : {
"web1.example.com" : "failure message"
}
"contacted" : {
"web2.example.com" : 1
}
}
A module can return any type of JSON data it wants, so Ansible can
be used as a framework to rapidly build powerful applications and scripts.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,55 +1,9 @@
Communicate
===========
Communicate and Get Involved
===========================
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
* 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
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
- View the `issue tracker <https://github.com/ansible/ansible/issues>`_
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,71 +1,65 @@
Examples
========
Examples 1
``````````
.. seealso::
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
:doc:`modules`
A list of available modules
:doc:`playbooks`
Alternative ways to use ansible
Examples 2
``````````
Parallelism and Shell Commands
``````````````````````````````
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
Reboot all web servers in Atlanta, 10 at a time::
Examples 3
``````````
ssh-agent bash
ssh-add ~/.ssh/id_rsa.pub
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
ansible atlanta -a "/sbin/reboot" -f 10
Examples 3
``````````
The -f 10 specifies the usage of 10 simultaneous processes.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there.
Example 2: Time Limited Background Operations
`````````````````````````````````````````````
Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won't lose track. Polling support is pending in the command line.::
ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff"
ansible all -n job_status -a jid=123456789
Any module other than 'copy' or 'template' can be backgrounded.
Examples 3: File Transfer & Templating
``````````````````````````````````````
Ansible can SCP lots of files to multiple machines in parallel, and optionally use them as template sources.
To just transfer a file directly to many different servers::
ansible atlanta copy -a "/etc/hosts /tmp/hosts"
To use templating, first run the setup module to put the template variables you would like to use on the remote host. Then use the template module to write the files using the templates. Templates are written in Jinja2 format. Playbooks (covered below) will run the setup module for you, making this even simpler.::
ansible webservers -m setup -a "favcolor=red ntp_server=192.168.1.1"
ansible webservers -m template -a "src=/srv/motd.j2 dest=/etc/motd"
ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"
Need something like the fqdn in a template? If facter or ohai are installed, data from these projects will also be made available to the template engine, using 'facter' and 'ohai' prefixes for each.
Examples 3: Deploying From Source Control
`````````````````````````````````````````
Deploy your webapp straight from git::
ansible webservers -m git -a "repo=git://foo dest=/srv/myapp version=HEAD"
Since ansible modules can notify change handlers (see 'Playbooks') it is possible to tell ansible to run specific tasks when the code is updated, such as deploying Perl/Python/PHP/Ruby directly from git and then restarting apache.
Examples 4
``````````
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,67 +1,100 @@
Getting Started
===============
How to ansible
How to download ansible and get started using it
.. seealso::
:doc:`examples`
Examples of basic commands
:doc:`YAMLScripts`
Complete documentation of the YAML syntax `ansible` understands.
Complete documentation of the YAML syntax `ansible` understands for playbooks.
:doc:`playbooks`
Learning ansible's configuration management language
:doc:`modules`
Learn about modules that ship with ansible
Requirements
````````````
Requirements are extremely minimal.
If you are running python 2.6 on the **overlord** machine, you will
need:
* ``paramiko``
* ``PyYAML``
* ``python-jinja2`` (for playbooks)
If you are running less than Python 2.6, you will also need:
* The Python 2.4 or 2.5 backport of the ``multiprocessing`` module
- `Installation and Testing Instructions <http://code.google.com/p/python-multiprocessing/wiki/Install>`_
* ``simplejson``
On the managed nodes, to use templating, you will need:
* ``python-jinja2`` (you can install this with ansible)
Developer Requirements
``````````````````````
For developers, you may wish to have:
* ``asciidoc`` (for building manpage documentation)
* ``python-sphinx`` (for building content for ansible.github.com)
What you need
-------------
Getting Ansible
```````````````
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
Tagged releases are available as tar.gz files from the Ansible github
project page:
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
* `Ansible/downloads <https://github.com/ansible/ansible/downloads>`_
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
You can also clone the git repository yourself and install Ansible in
one of two ways:
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.
Python Distutils
++++++++++++++++
You can also install Ansible using Python Distutils::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ sudo make install
Via RPM
+++++++
In the near future, pre-built RPMs will be available through your distribution. Until that time you
can use the ``make rpm`` command::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ make rpm
$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm
Your first commands
```````````````````
Edit /etc/ansible/hosts and put one or more remote systems in it, for which you have your SSH
key in ``authorized_keys``::
192.168.1.50
aserver.example.org
bserver.example.org
Now try this:
ssh-agent bash
ssh-add ~/.ssh/id_rsa
ansible all -m ping
Congratulations. You've just contacted your nodes with Ansible. It's now time to read some
of the more real-world examples.

View file

@ -5,102 +5,48 @@
Ansible
=======
Ansible is a extra-simple tool/API for doing 'parallel remote things'
over SSH -- whether executing commands, running "modules", or
executing larger 'playbooks' that can serve as a configuration
management or deployment system.
Ansible is a radically simple deployment, configuration, and command execution framework.
Other tools in this space have been too complicated for too long, require too much bootstrapping,
and have too much learning curve. Ansible is dead simple and painless to extend. For comparison, Puppet and Chef have about 60k lines of code. Ansible's core is a little over 1000 lines.
While `Func installation <http://fedorahosted.org/func>`_ which I
co-wrote, aspired to avoid using SSH and have it's own daemon
infrastructure, Ansible aspires to be quite different and more
minimal, but still able to grow more modularly over time. This is
based on talking to a lot of users of various tools and wishing to
eliminate problems with connectivity and long running daemons, or not
picking tool `X` because they preferred to code in `Y`. Further,
playbooks take things a whole step further, building the config and
deployment system I always wanted to build.
Ansible isn't just for configuration -- it's also great for Ad-Hoc tasks,
quickly firing off commands against nodes. Where Ansible excels though, is expressing complex multi-node deployment processes, executing complex sequences of commands on different hosts through the "playbooks" feature.
Why use Ansible versus something else? (Fabric, Capistrano,
Ansible does not require programming in any particular language -- you can write modules
as scripts or programs that return simple JSON.
Why use Ansible versus something else? (Puppet, Chef, Fabric, Capistrano,
mCollective, Func, SaltStack, etc?) It will have far less code, it
will be more correct, and it will be the easiest thing to hack on and
use you'll ever see -- regardless of your favorite language of choice.
Want to only code plugins in bash or clojure? Ansible doesn't care.
The docs will fit on one page and the source will be blindingly
obvious.
Systems management doesn't have to be complicated. Ansible's docs will remain
short & simple, and the source will be blindingly obvious.
Design Principles
`````````````````
Design Goals
````````````
* Dead simple setup
* Super fast & parallel by default
* No server or client daemons; use existing SSHd
* No server or client daemons; use existing SSHd out of the box
* No additional software required on client boxes
* Modules can be written in ANY language
* Awesome API for creating very powerful distributed scripts
* Be usable as non-root
* Create the easiest config management system to use, ever.
About the Author
````````````````
Requirements
````````````
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.
Requirements are extremely minimal.
If you are running python 2.6 on the **overlord** machine, you will
need:
* ``paramiko``
* ``PyYAML``
* ``python-jinja2`` (for playbooks)
* ``Asciidoc`` (for building documentation)
If you are running less than Python 2.6, you will also need:
* The Python 2.4 or 2.5 backport of the ``multiprocessing`` module
- `Installation and Testing Instructions <http://code.google.com/p/python-multiprocessing/wiki/Install>`_
* ``simplejson``
On the managed nodes, to use templating, you will need:
* ``python-jinja2`` (you can install this with ansible)
Getting Ansible
```````````````
Tagged releases are available as tar.gz files from the Ansible github
project page:
* `Ansible/downloads <https://github.com/ansible/ansible/downloads>`_
You can also clone the git repository yourself and install Ansible in
one of two ways:
Python Distutils
++++++++++++++++
You can install Ansible using Python Distutils::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ sudo make install
Via RPM
+++++++
In the future, pre-built RPMs may be available. Until that time you
can use the ``make rpm`` command::
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ make rpm
$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm
Ansible is an GPLv3 licensed open source project, so see the contributions section for how to
get involved.
Contents
========
@ -109,21 +55,11 @@ Contents
:maxdepth: 3
gettingstarted
YAMLScripts
patterns
modules
YAMLScripts
playbooks
examples
api
communicate
man
Communicate or 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>`_

View file

@ -3,19 +3,10 @@
Man Pages
=========
Ansile ships with a handfull of manpages to help you on your journey.
Ansible's manpage lists available command line options.
ansible(1)
----------
* `View ansible.1 <man/ansible.1.html>`_
ansible-modules(5)
------------------
* `View ansible-modules.5 <man/ansible-modules.5.html>`_
ansible-playbook(5)
-------------------
* `View ansible-playbook.5 <man/ansible-playbook.5.html>`_

View file

@ -1,55 +1,201 @@
Modules
=======
Ansible Modules
===============
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
.. seealso::
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
:doc:`examples`
Examples of using modules in /usr/bin/ansible
:doc:`playbooks`
Examples of using modules with /usr/bin/ansible-playbook
:doc:`api`
Examples of using modules with the Python API
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
About Modules
`````````````
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.
Ansible ships with a number of modules that can be executed directly on remote hosts or through
ansible playbooks.
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
trigger change events. Unless otherwise noted, all modules support change hooks.
command
```````
The command module takes the command name followed by a list of arguments, space delimited.
This is the only module that does not use key=value style parameters.
Example usage::
/sbin/shutdown -t now
This module does not support change hooks and returns the return code from the program as well as timing information about how long the command was running for.
copy
````
The copy module moves a file on the local box to remote locations.
*src*::
Local absolute path to a file to copy to the remote server
*dest*::
Remote absolute path where the file should end up
This module also returns md5sum information about the resultant file.
facter
``````
Runs the discovery program 'facter' on the remote system, returning
JSON data that can be useful for inventory purposes.
Requires that 'facter' and 'ruby-json' be installed on the remote end.
This module is informative only - it takes no parameters & does not support change hooks,
nor does it make any changes on the system.
git
```
Deploys software from git checkouts.
*repo*::
git or http protocol address of the repo to checkout
*dest*::
where to check it out, an absolute directory path
*version*::
what version to check out -- either the git SHA, the literal string 'HEAD', or a tag name
ohai
````
Similar to the facter module, this returns JSON inventory data. Ohai
data is a bit more verbose and nested than facter.
Requires that 'ohai' be installed on the remote end.
This module is information only - it takes no parameters & does not
support change hooks, nor does it make any changes on the system.
ping
````
A trivial test module, this module always returns the integer '1' on
successful contact.
This module does not support change hooks.
This module is informative only - it takes no parameters & does not
support change hooks, nor does it make any changes on the system.
service
```````
Controls services on remote machines.
*state*
Values are 'started', 'stopped', or 'restarted'. Started/stopped
are idempotent actions that will not run commands unless neccessary.
'restarted' will always bounce the service
*name*
The name of the service
setup
`````
Writes a JSON file containing key/value data, for use in templating.
Call this once before using the template modules. Playbooks will
execute this module automatically as the first step in each play.
If facter or ohai are installed, variables from these programs will also
be snapshotted into the JSON file for usage in templating. These variables
are prefixed with 'facter_' and 'ohai_" so it's easy to tell their source.
*metadata*
Optionally overrides the default JSON file location of /etc/ansible/setup or ~/ansible/setup
depending on what remote user has been specified.
If used, also supply the metadata parameter to the template module.
*anything*
any other parameters can be named basically anything, and set a key=value
pair in the JSON file for use in templating.
template
````````
Templates a file out to a remote server. Call the setup module prior to usage.
*src*
path of a Jinja2 formatted template on the local server
*dest*
location to render the template on the remote server
*metadata*
location of a JSON file to use to supply template data. Default is /etc/ansible/setup
which is the same as the default for the setup module. Change if running as a non-root
remote user who does not have permissions on /etc/ansible.
This module also returns md5sum information about the resultant file.
user
````
This module is in plan.
yum
```
This module is in plan.
WRITING YOUR OWN MODULES
````````````````````````
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.
To support change hooks, modules should return hashes with a changed: True/False
element at the top level. Modules can also choose to indicate a failure scenario
by returning a top level 'failure' element with a True value, and a 'msg' element
describing the nature of the failure. Other values are up to the module.

View file

@ -1,55 +1,69 @@
Patterns
========
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
How to select hosts you wish to manage
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
.. seealso::
:doc:`examples`
Examples of basic commands
:doc:`playbooks`
Learning ansible's configuration management language
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::
mail.example.com
[webservers]
foo.example.com
bar.example.com
[dbservers]
one.example.com
two.example.com
three.example.com
Targetting All Systems
``````````````````````
The pattern 'all' or '*' targets all systems in the inventory file.
Specific Hosts
``````````````
It is possible to address specific hosts:
one.example.com
one.example.com:two.example.com
Groups
``````
The following patterns address one or more groups:
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
one*.com:dbservers
It is not possible to target a host not in the inventory file.
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.

View file

@ -1,55 +1,118 @@
Playbooks
=========
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim
placerat nibh, non feugiat risus varius vitae. Donec eu libero
lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in
magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum,
dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus
mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae
luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis
ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa,
rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies
tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis
egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna
sem. Donec arcu felis, faucibus et malesuada non, blandit vitae
metus. Fusce nec sapien dolor.
.. seealso::
Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at,
pretium quis sapien. Duis felis metus, sodales sit amet gravida in,
pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin
eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at,
suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada
molestie, nisi nunc placerat libero, vel vulputate elit tellus et
augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat
egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan
lorem eget leo dictum viverra.
:doc:`YAMLScripts`
Learn about YAML syntax
:doc:`modules`
Learn about available modules and writing your own
:doc:`patterns`
Learn about how to select hosts
Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean
ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar
quam. Suspendisse nec massa vel augue laoreet ultricies in convallis
dolor. Mauris sodales porta enim, non ultricies dolor luctus
in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate,
erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra
arcu sem a ante. Praesent nec metus vestibulum augue eleifend
suscipit. In feugiat, sem nec dignissim consequat, velit tortor
scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh
turpis. Proin ac nisi ligula, a pretium augue.
In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed
ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl,
eget lobortis mi magna sed metus. Cras justo est, tempus quis
adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et
luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae
nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc
sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet
lacus. Maecenas interdum viverra laoreet. Quisque elementum
sollicitudin ullamcorper.
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
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 line
``````````
The hosts line is alist of one or more groups or host patterns, seperated by colons.::
webservers:dbservers:*.foo.example.com
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::
{{ varname }}
These variables will be pushed down to the managed systems for use in templating operations.
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'.
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.
Task name and comment
`````````
Each task has a name (required) and optional comment. This is for informational purposes only
Task action
```````````
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.
Notify statements
`````````````````
Nearly all modules are written to be 'idempotent' and can signal when they have affected a change
on the remote system. If a notify statement is used, the named handler will be run against
each system where a change was effected, but NOT on systems where no change occurred.
Handlers
````````
Handlers are lists of tasks, not really any different from regular tasks, that are referenced
by name.
Includes
````````
Not all tasks have to be listed directly in the main file. An include file can contain
a list of tasks (in YAML) as well, optionally passing extra variables into the file.
Variables passed in can be deferenced like this:
{{ variable }}
Asynchronous Actions and Polling
````````````````````````````````
(Information on this feature is pending)
Executing A Playbook
````````````````````
To run a playbook::
ansible-playbook playbook.yml
Pellentesque mauris sem, malesuada at lobortis in, porta eget
urna. Duis aliquet quam eget risus elementum quis auctor ligula
gravida. Phasellus et ullamcorper libero. Nam elementum ultricies
tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat
tristique lobortis. Suspendisse est enim, tristique eu convallis id,
rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin
hendrerit mi tincidunt dui fermentum placerat.