add documentation stub for apt, and fix agreement issues caused by Tim's doc ref link fixup.

This commit is contained in:
Michael DeHaan 2012-03-26 19:48:32 -04:00
parent d584cdf501
commit 1f565c3d76
19 changed files with 112 additions and 65 deletions

View file

@ -245,8 +245,8 @@ languages:
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

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

View file

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

View file

@ -330,8 +330,8 @@ a conf.d file appropriately or something similar. Who knows.</p>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -329,8 +329,8 @@ a simplified syntax for this.</p>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -336,8 +336,8 @@ tasks &#8211; whether for a QA sytem, build system, or anything you can think of
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -160,8 +160,8 @@ s.parentNode.insertBefore(ga, s);
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -299,8 +299,8 @@ explore, but you already have a fully working infrastructure!</p>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -260,7 +260,8 @@ Email: <input type=text name=email>&nbsp;&nbsp;<input type=submit name="sub" val
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">Ansible Modules</a><ul> <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#command">command</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#apt">apt</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#id1">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#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#facter">facter</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#file">file</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#file">file</a></li>
@ -370,8 +371,8 @@ Puppet Labs, and rPath. Reach Michael by email <a class="reference external" hr
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -194,8 +194,8 @@ examples of these tools in use.</p>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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-playbook</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-playbook" lang="en"><a id="id537662"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-playbook — run an ansible playbook</p></div><div class="refsynopsisdiv" title="Synopsis"><a id="_synopsis"></a><h2>Synopsis</h2><p>ansible-playbook &lt;filename.yml&gt; … [options]</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p><span class="strong"><strong>Ansible playbooks</strong></span> are a configuration and multinode deployment <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ansible-playbook</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-playbook" lang="en"><a id="id493526"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-playbook — run an ansible playbook</p></div><div class="refsynopsisdiv" title="Synopsis"><a id="_synopsis"></a><h2>Synopsis</h2><p>ansible-playbook &lt;filename.yml&gt; … [options]</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p><span class="strong"><strong>Ansible playbooks</strong></span> are a configuration and multinode deployment
system. Ansible-playbook is the tool used to run them. See the system. Ansible-playbook is the tool used to run them. See the
project home page (link below) for more information.</p></div><div class="refsect1" title="ARGUMENTS"><a id="_arguments"></a><h2>ARGUMENTS</h2><div class="variablelist"><dl><dt><span class="term"> project home page (link below) for more information.</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>filename.yml</strong></span> <span class="strong"><strong>filename.yml</strong></span>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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="id413895"></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="id481682"></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"> 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 class="strong"><strong>host-pattern</strong></span>
</span></dt><dd> </span></dt><dd>

View file

@ -394,8 +394,8 @@ Stop by the mailing list to inquire about requirements.</p>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -129,7 +129,8 @@ s.parentNode.insertBefore(ga, s);
class="dropdown-toggle">Page</a> class="dropdown-toggle">Page</a>
<span class="localtoc"><ul> <span class="localtoc"><ul>
<li><a class="reference internal" href="#">Ansible Modules</a><ul> <li><a class="reference internal" href="#">Ansible Modules</a><ul>
<li><a class="reference internal" href="#command">command</a></li> <li><a class="reference internal" href="#apt">apt</a></li>
<li><a class="reference internal" href="#id1">command</a></li>
<li><a class="reference internal" href="#copy">copy</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="#facter">facter</a></li>
<li><a class="reference internal" href="#file">file</a></li> <li><a class="reference internal" href="#file">file</a></li>
@ -196,8 +197,25 @@ to avoid changes to the system unless a change needs to be made. When using ans
playbooks, these modules can trigger &#8216;change events&#8217;. Unless otherwise playbooks, these modules can trigger &#8216;change events&#8217;. Unless otherwise
noted, any given module does support change hooks.</p> noted, any given module does support change hooks.</p>
<p>Let&#8217;s see what&#8217;s available in the Ansible module library, out of the box:</p> <p>Let&#8217;s see what&#8217;s available in the Ansible module library, out of the box:</p>
<div class="section" id="command"> <div class="section" id="apt">
<span id="id1"></span><h2>command<a class="headerlink" href="#command" title="Permalink to this headline"></a></h2> <span id="command"></span><h2>apt<a class="headerlink" href="#apt" title="Permalink to this headline"></a></h2>
<p>Manages apt-packages (such as for Debian/Ubuntu).</p>
<p><em>pkg</em>:</p>
<ul class="simple">
<li>A package name or package specifier with version, like name-1.0</li>
</ul>
<p><em>state</em>:</p>
<ul class="simple">
<li>Can be either &#8216;installed&#8217; or &#8216;removed&#8217;. NOTE: support</li>
</ul>
<p>for &#8216;latest&#8217; (see yum, below) is in work.</p>
<p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>apt pkg=foo ensure=removed
apt pkg=foo ensure=installed</pre>
</div>
</div>
<div class="section" id="id1">
<h2>command<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<p>The command module takes the command name followed by a list of <p>The command module takes the command name followed by a list of
arguments, space delimited.</p> arguments, space delimited.</p>
<p>If you want to run a command through the shell (say you are using <p>If you want to run a command through the shell (say you are using
@ -210,7 +228,7 @@ paths to commands must be fully qualified.</p>
<p>This module does not support change hooks and returns the return code <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 from the program as well as timing information about how long the
command was running for.</p> command was running for.</p>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>command /sbin/shutdown -t now</pre> <div class="highlight-python"><pre>command /sbin/shutdown -t now</pre>
</div> </div>
</div> </div>
@ -229,7 +247,7 @@ absolute or relative path.</li>
<li>Remote absolute path where the file should end up.</li> <li>Remote absolute path where the file should end up.</li>
</ul> </ul>
<p>This module also returns md5sum information about the resultant file.</p> <p>This module also returns md5sum information about the resultant file.</p>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>copy src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644</pre> <div class="highlight-python"><pre>copy src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644</pre>
</div> </div>
</div> </div>
@ -267,7 +285,7 @@ to the file module are also available when running the <cite>copy</cite> or <cit
<ul class="simple"> <ul class="simple">
<li>name of group that should own the file or directory, as would be given to <cite>chgrp</cite></li> <li>name of group that should own the file or directory, as would be given to <cite>chgrp</cite></li>
</ul> </ul>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>file dest=/etc/foo.conf owner=foo group=foo mode=0644 <div class="highlight-python"><pre>file dest=/etc/foo.conf owner=foo group=foo mode=0644
file dest=/some/path owner=foo group=foo state=directory file dest=/some/path owner=foo group=foo state=directory
file dest/path/to/delete state=absent</pre> file dest/path/to/delete state=absent</pre>
@ -289,7 +307,7 @@ file dest/path/to/delete state=absent</pre>
<li>What version to check out &#8211; either the git SHA, the literal string <li>What version to check out &#8211; either the git SHA, the literal string
<tt class="docutils literal"><span class="pre">HEAD</span></tt>, or a tag name.</li> <tt class="docutils literal"><span class="pre">HEAD</span></tt>, or a tag name.</li>
</ul> </ul>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>git repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout version=release-0.22</pre> <div class="highlight-python"><pre>git repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout version=release-0.22</pre>
</div> </div>
</div> </div>
@ -324,7 +342,7 @@ unless necessary. <tt class="docutils literal"><span class="pre">restarted</spa
<ul class="simple"> <ul class="simple">
<li>The name of the service.</li> <li>The name of the service.</li>
</ul> </ul>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>service name=httpd state=started <div class="highlight-python"><pre>service name=httpd state=started
service name=httpd state=stopped service name=httpd state=stopped
service name=httpd state=restarted</pre> service name=httpd state=restarted</pre>
@ -348,7 +366,7 @@ tell their source. All variables are then bubbled up to the caller.</p>
<tt class="docutils literal"><span class="pre">key=value</span></tt> pair in the JSON file for use in templating.</li> <tt class="docutils literal"><span class="pre">key=value</span></tt> pair in the JSON file for use in templating.</li>
</ul> </ul>
</div></blockquote> </div></blockquote>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>vars: <div class="highlight-python"><pre>vars:
ntpserver: 'ntp.example.com' ntpserver: 'ntp.example.com'
xyz: 1234</pre> xyz: 1234</pre>
@ -427,7 +445,7 @@ example in the github examples directory for what this looks like in a playbook.
<ul class="simple"> <ul class="simple">
<li>Defaults to &#8216;present&#8217;. When &#8216;absent&#8217;, the user account will be removed if present.</li> <li>Defaults to &#8216;present&#8217;. When &#8216;absent&#8217;, the user account will be removed if present.</li>
</ul> </ul>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>user name=mdehaan comment=awesome passwd=awWxVV.JvmdHw createhome=yes <div class="highlight-python"><pre>user name=mdehaan comment=awesome passwd=awWxVV.JvmdHw createhome=yes
user name=mdehaan state=absent</pre> user name=mdehaan state=absent</pre>
</div> </div>
@ -449,7 +467,7 @@ user name=mdehaan state=absent</pre>
various configuration attributes. Values include &#8216;installed&#8217;, &#8216;updates&#8217;, various configuration attributes. Values include &#8216;installed&#8217;, &#8216;updates&#8217;,
&#8216;available&#8217;, &#8216;repos&#8217;, or any package specifier.</li> &#8216;available&#8217;, &#8216;repos&#8217;, or any package specifier.</li>
</ul> </ul>
<p>Example action from a <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p> <p>Example action from ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>yum pkg=httpd ensure=latest <div class="highlight-python"><pre>yum pkg=httpd ensure=latest
yum pkg=httpd ensure=removed yum pkg=httpd ensure=removed
yum pkg=httpd ensure=installed</pre> yum pkg=httpd ensure=installed</pre>
@ -485,8 +503,8 @@ yum pkg=httpd ensure=installed</pre>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -240,8 +240,8 @@ wildcards:</p>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -246,8 +246,7 @@ documentation. The <cite>user</cite> is just the name of the user account:</p>
other: 'magic'</pre> other: 'magic'</pre>
</div> </div>
<p>These variables can be used later in the playbook, or on the managed system (in templates), just like this:</p> <p>These variables can be used later in the playbook, or on the managed system (in templates), just like this:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{{</span> <span class="n">varname</span> <span class="p">}}</span> <div class="highlight-python"><pre>{{ varname }}</pre>
</pre></div>
</div> </div>
<p>Within playbooks themselves, but not within templates on the remote machines, it&#8217;s also legal <p>Within playbooks themselves, but not within templates on the remote machines, it&#8217;s also legal
to use nicer shorthand like this:</p> to use nicer shorthand like this:</p>
@ -466,8 +465,7 @@ include files to do this.</p>
</div> </div>
<p>Variables passed in can be used in the include files too. Assume a variable named &#8216;user&#8217;. Using <p>Variables passed in can be used in the include files too. Assume a variable named &#8216;user&#8217;. Using
<cite>jinja2</cite> syntax, anywhere in the included file, you can say:</p> <cite>jinja2</cite> syntax, anywhere in the included file, you can say:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{{</span> <span class="n">user</span> <span class="p">}}</span> <div class="highlight-python"><pre>{{ user }}</pre>
</pre></div>
</div> </div>
<p>I can also pass variables into includes directly. We might call this a &#8216;parameterized include&#8217;.</p> <p>I can also pass variables into includes directly. We might call this a &#8216;parameterized include&#8217;.</p>
<p>For instance, if deploying multiple wordpress instances, I could <p>For instance, if deploying multiple wordpress instances, I could
@ -624,8 +622,8 @@ Let&#8217;s run a playbook using a parallelism level of 10:</p>
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -29,7 +29,7 @@ that. If you're writing your own module, you care, and this means you do
not have to write modules in any particular language -- you get tho choose. not have to write modules in any particular language -- you get tho choose.
Most modules other than command are `idempotent`, meaning they will seek Most modules other than command are `idempotent`, meaning they will seek
to avoid changes to the system unless a change needs to be made. When using ansible to avoid changes to the system unless a change needs to be made. When using Ansible
playbooks, these modules can trigger 'change events'. Unless otherwise playbooks, these modules can trigger 'change events'. Unless otherwise
noted, any given module does support change hooks. noted, any given module does support change hooks.
@ -37,6 +37,26 @@ Let's see what's available in the Ansible module library, out of the box:
.. _command: .. _command:
apt
```
Manages apt-packages (such as for Debian/Ubuntu).
*pkg*:
* A package name or package specifier with version, like name-1.0
*state*:
* Can be either 'installed' or 'removed'. NOTE: support
for 'latest' (see yum, below) is in work.
Example action from Ansible :doc:`playbooks`::
apt pkg=foo ensure=removed
apt pkg=foo ensure=installed
command command
``````` ```````
@ -56,7 +76,7 @@ This module does not support change hooks and returns the return code
from the program as well as timing information about how long the from the program as well as timing information about how long the
command was running for. command was running for.
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
command /sbin/shutdown -t now command /sbin/shutdown -t now
@ -82,7 +102,7 @@ module.
This module also returns md5sum information about the resultant file. This module also returns md5sum information about the resultant file.
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
copy src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644 copy src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644
@ -128,7 +148,7 @@ to the file module are also available when running the `copy` or `template` modu
* name of group that should own the file or directory, as would be given to `chgrp` * name of group that should own the file or directory, as would be given to `chgrp`
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
file dest=/etc/foo.conf owner=foo group=foo mode=0644 file dest=/etc/foo.conf owner=foo group=foo mode=0644
file dest=/some/path owner=foo group=foo state=directory file dest=/some/path owner=foo group=foo state=directory
@ -153,7 +173,7 @@ Deploys software (or files) from git checkouts.
* What version to check out -- either the git SHA, the literal string * What version to check out -- either the git SHA, the literal string
``HEAD``, or a tag name. ``HEAD``, or a tag name.
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
git repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout version=release-0.22 git repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout version=release-0.22
@ -198,7 +218,7 @@ Controls services on remote machines.
* The name of the service. * The name of the service.
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
service name=httpd state=started service name=httpd state=started
service name=httpd state=stopped service name=httpd state=stopped
@ -226,15 +246,15 @@ tell their source. All variables are then bubbled up to the caller.
* Any other parameters can be named basically anything, and set a * Any other parameters can be named basically anything, and set a
``key=value`` pair in the JSON file for use in templating. ``key=value`` pair in the JSON file for use in templating.
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
vars: vars:
ntpserver: 'ntp.example.com' ntpserver: 'ntp.example.com'
xyz: 1234 xyz: 1234
Example action from `/usr/bin/ansible`:: Example action from `/usr/bin/Ansible`::
ansible -m all setup -a "ntpserver=ntp.example.com xyz=1234" Ansible -m all setup -a "ntpserver=ntp.example.com xyz=1234"
.. _shell: .. _shell:
@ -325,7 +345,7 @@ Creates user accounts, manipulates existing user accounts, and removes user acco
* Defaults to 'present'. When 'absent', the user account will be removed if present. * Defaults to 'present'. When 'absent', the user account will be removed if present.
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
user name=mdehaan comment=awesome passwd=awWxVV.JvmdHw createhome=yes user name=mdehaan comment=awesome passwd=awWxVV.JvmdHw createhome=yes
user name=mdehaan state=absent user name=mdehaan state=absent
@ -351,7 +371,7 @@ Will install, upgrade, remove, and list packages with the yum package manager.
various configuration attributes. Values include 'installed', 'updates', various configuration attributes. Values include 'installed', 'updates',
'available', 'repos', or any package specifier. 'available', 'repos', or any package specifier.
Example action from a :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
yum pkg=httpd ensure=latest yum pkg=httpd ensure=latest
yum pkg=httpd ensure=removed yum pkg=httpd ensure=removed
@ -366,14 +386,14 @@ See :doc:`moduledev`.
.. seealso:: .. seealso::
:doc:`examples` :doc:`examples`
Examples of using modules in /usr/bin/ansible Examples of using modules in /usr/bin/Ansible
:doc:`playbooks` :doc:`playbooks`
Examples of using modules with /usr/bin/ansible-playbook Examples of using modules with /usr/bin/Ansible-playbook
:doc:`moduledev` :doc:`moduledev`
How to write your own modules How to write your own modules
:doc:`api` :doc:`api`
Examples of using modules with the Python API Examples of using modules with the Python API
`Mailing List <http://groups.google.com/group/ansible-project>`_ `Mailing List <http://groups.google.com/group/Ansible-project>`_
Questions? Help? Ideas? Stop by the list on Google Groups Questions? Help? Ideas? Stop by the list on Google Groups
`irc.freenode.net <http://irc.freenode.net>`_ `irc.freenode.net <http://irc.freenode.net>`_
#ansible IRC chat channel #ansible IRC chat channel

View file

@ -177,8 +177,8 @@ s.parentNode.insertBefore(ga, s);
<p class="pull-right"><a href="#">Back to top</a></p> <p class="pull-right"><a href="#">Back to top</a></p>
<p> <p>
&copy; Copyright 2012 Michael DeHaan.<br/> &copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on Mar 23, 2012.<br/> Last updated on Mar 26, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>
</footer> </footer>

File diff suppressed because one or more lines are too long