Update docs

pull/4420/head
Michael DeHaan 2012-04-06 11:41:18 -04:00
parent 1171da6fcd
commit bef07194c0
17 changed files with 152 additions and 39 deletions

View File

@ -246,7 +246,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -331,7 +331,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -270,7 +270,8 @@ as removal of user accounts that may exist:</p>
ansible all -m user -a "name=foo state=absent"</pre> ansible all -m user -a "name=foo state=absent"</pre>
</div> </div>
<p>See the <a class="reference internal" href="modules.html"><em>Ansible Modules</em></a> section for details on all of the available options.</p> <p>See the <a class="reference internal" href="modules.html"><em>Ansible Modules</em></a> section for details on all of the available options, including
how to manipulate groups and group membership.</p>
</div> </div>
<div class="section" id="deploying-from-source-control"> <div class="section" id="deploying-from-source-control">
<h2>Deploying From Source Control<a class="headerlink" href="#deploying-from-source-control" title="Permalink to this headline"></a></h2> <h2>Deploying From Source Control<a class="headerlink" href="#deploying-from-source-control" title="Permalink to this headline"></a></h2>
@ -340,7 +341,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -337,7 +337,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -161,7 +161,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -300,7 +300,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -267,7 +267,7 @@ Email: <input type=text name=email>&nbsp;&nbsp;<input type=submit name="sub" val
</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#apt">apt</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#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#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>
@ -280,6 +280,7 @@ Email: <input type=text name=email>&nbsp;&nbsp;<input type=submit name="sub" val
<li class="toctree-l2"><a class="reference internal" href="modules.html#shell">shell</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#shell">shell</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#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#user">user</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#virt">virt</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#yum">yum</a></li>
<li class="toctree-l2"><a class="reference internal" href="modules.html#writing-your-own-modules">Writing your own modules</a></li> <li class="toctree-l2"><a class="reference internal" href="modules.html#writing-your-own-modules">Writing your own modules</a></li>
</ul> </ul>
@ -378,7 +379,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -195,7 +195,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

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" 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="id451099"></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="id350747"></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" 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="id434476"></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="id373957"></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

@ -395,7 +395,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -131,7 +131,7 @@ s.parentNode.insertBefore(ga, s);
<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="#apt">apt</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="#command">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>
@ -144,6 +144,7 @@ s.parentNode.insertBefore(ga, s);
<li><a class="reference internal" href="#shell">shell</a></li> <li><a class="reference internal" href="#shell">shell</a></li>
<li><a class="reference internal" href="#template">template</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="#user">user</a></li>
<li><a class="reference internal" href="#virt">virt</a></li>
<li><a class="reference internal" href="#yum">yum</a></li> <li><a class="reference internal" href="#yum">yum</a></li>
<li><a class="reference internal" href="#writing-your-own-modules">Writing your own modules</a></li> <li><a class="reference internal" href="#writing-your-own-modules">Writing your own modules</a></li>
</ul> </ul>
@ -200,7 +201,7 @@ playbooks, these modules can trigger &#8216;change events&#8217;. Unless otherw
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="apt"> <div class="section" id="apt">
<span id="command"></span><h2>apt<a class="headerlink" href="#apt" title="Permalink to this headline"></a></h2> <span id="id1"></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>Manages apt-packages (such as for Debian/Ubuntu).</p>
<p><em>pkg</em>:</p> <p><em>pkg</em>:</p>
<ul class="simple"> <ul class="simple">
@ -208,15 +209,18 @@ noted, any given module does support change hooks.</p>
</ul> </ul>
<p><em>state</em>:</p> <p><em>state</em>:</p>
<ul class="simple"> <ul class="simple">
<li>Can be either &#8216;installed&#8217; or &#8216;removed&#8217;. NOTE: support for &#8216;latest&#8217; (see yum, below) is in work.</li> <li>Can be either &#8216;installed&#8217;, &#8216;removed&#8217;, or &#8216;latest&#8217;.</li>
</ul> </ul>
<p>Example action from Ansible <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>apt pkg=foo ensure=removed <div class="highlight-python"><pre>apt pkg=foo ensure=removed
apt pkg=foo ensure=installed</pre> apt pkg=foo ensure=installed
apt pkg=foo ensure=latest</pre>
</div> </div>
<p>NOTE: the apt module cannot currently request installation of a specific software version, as the yum
module can. This should be available in a future release.</p>
</div> </div>
<div class="section" id="id1"> <div class="section" id="command">
<h2>command<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2> <span id="id2"></span><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 <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
@ -232,9 +236,14 @@ command was running for.</p>
<p>Example action from Ansible <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>
<p>If you only want to run a command if a certain file does not exist, you can do the
following:</p>
<div class="highlight-python"><pre>command /usr/bin/make_database.sh arg1 arg2 creates=/path/to/database</pre>
</div>
<p>The <cite>creates=</cite> option will not be passed to the executable.</p>
</div> </div>
<div class="section" id="copy"> <div class="section" id="copy">
<span id="id2"></span><h2>copy<a class="headerlink" href="#copy" title="Permalink to this headline"></a></h2> <span id="id3"></span><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. In addition to the options <p>The copy module moves a file on the local box to remote locations. In addition to the options
listed below, the arguments available to the <cite>file</cite> module can also be passed to the copy listed below, the arguments available to the <cite>file</cite> module can also be passed to the copy
module.</p> module.</p>
@ -253,7 +262,7 @@ absolute or relative path.</li>
</div> </div>
</div> </div>
<div class="section" id="facter"> <div class="section" id="facter">
<span id="id3"></span><h2>facter<a class="headerlink" href="#facter" title="Permalink to this headline"></a></h2> <span id="id4"></span><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 <p>Runs the discovery program &#8216;facter&#8217; on the remote system, returning
JSON data that can be useful for inventory purposes.</p> 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>Requires that &#8216;facter&#8217; and &#8216;ruby-json&#8217; be installed on the remote end.</p>
@ -263,7 +272,7 @@ Playbooks do not actually use this module, they use the <a class="reference inte
module behind the scenes.</p> module behind the scenes.</p>
</div> </div>
<div class="section" id="file"> <div class="section" id="file">
<h2>file<a class="headerlink" href="#file" title="Permalink to this headline"></a></h2> <span id="id5"></span><h2>file<a class="headerlink" href="#file" title="Permalink to this headline"></a></h2>
<p>Sets attributes of files, symlinks, and directories, or removes files/symlinks/directories. <p>Sets attributes of files, symlinks, and directories, or removes files/symlinks/directories.
All parameters available to the file module are also available when running the <cite>copy</cite> or All parameters available to the file module are also available when running the <cite>copy</cite> or
<cite>template</cite> modules.</p> <cite>template</cite> modules.</p>
@ -303,7 +312,7 @@ file src=/file/to/link/to dest=/path/to/symlink owner=foo group=foo state=link</
</div> </div>
</div> </div>
<div class="section" id="git"> <div class="section" id="git">
<h2>git<a class="headerlink" href="#git" title="Permalink to this headline"></a></h2> <span id="id6"></span><h2>git<a class="headerlink" href="#git" title="Permalink to this headline"></a></h2>
<p>Deploys software (or files) from git checkouts.</p> <p>Deploys software (or files) from git checkouts.</p>
<p><em>repo</em>:</p> <p><em>repo</em>:</p>
<ul class="simple"> <ul class="simple">
@ -323,7 +332,7 @@ file src=/file/to/link/to dest=/path/to/symlink owner=foo group=foo state=link</
</div> </div>
</div> </div>
<div class="section" id="group"> <div class="section" id="group">
<h2>group<a class="headerlink" href="#group" title="Permalink to this headline"></a></h2> <span id="id7"></span><h2>group<a class="headerlink" href="#group" title="Permalink to this headline"></a></h2>
<p>Adds or removes groups.</p> <p>Adds or removes groups.</p>
<p><em>name</em>:</p> <p><em>name</em>:</p>
<ul class="simple"> <ul class="simple">
@ -343,7 +352,7 @@ file src=/file/to/link/to dest=/path/to/symlink owner=foo group=foo state=link</
</div> </div>
</div> </div>
<div class="section" id="ohai"> <div class="section" id="ohai">
<h2>ohai<a class="headerlink" href="#ohai" title="Permalink to this headline"></a></h2> <span id="id8"></span><h2>ohai<a class="headerlink" href="#ohai" title="Permalink to this headline"></a></h2>
<p>Similar to the <a class="reference internal" href="#facter"><em>facter</em></a> module, this returns JSON inventory data. <p>Similar to the <a class="reference internal" href="#facter"><em>facter</em></a> module, this returns JSON inventory data.
Ohai data is a bit more verbose and nested than facter.</p> 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>Requires that &#8216;ohai&#8217; be installed on the remote end.</p>
@ -353,7 +362,7 @@ support change hooks, nor does it make any changes on the system.</p>
<a class="reference internal" href="#setup"><em>setup</em></a> module behind the scenes instead.</p> <a class="reference internal" href="#setup"><em>setup</em></a> module behind the scenes instead.</p>
</div> </div>
<div class="section" id="ping"> <div class="section" id="ping">
<h2>ping<a class="headerlink" href="#ping" title="Permalink to this headline"></a></h2> <span id="id9"></span><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 <tt class="docutils literal"><span class="pre">1</span></tt> on <p>A trivial test module, this module always returns the integer <tt class="docutils literal"><span class="pre">1</span></tt> on
successful contact.</p> successful contact.</p>
<p>This module does not support change hooks and is informative only - it <p>This module does not support change hooks and is informative only - it
@ -361,7 +370,7 @@ takes no parameters &amp; does not support change hooks, nor does it make
any changes on the system.</p> any changes on the system.</p>
</div> </div>
<div class="section" id="service"> <div class="section" id="service">
<h2>service<a class="headerlink" href="#service" title="Permalink to this headline"></a></h2> <span id="id10"></span><h2>service<a class="headerlink" href="#service" title="Permalink to this headline"></a></h2>
<p>Controls services on remote machines.</p> <p>Controls services on remote machines.</p>
<p><em>state</em>:</p> <p><em>state</em>:</p>
<ul class="simple"> <ul class="simple">
@ -380,7 +389,7 @@ service name=httpd state=restarted</pre>
</div> </div>
</div> </div>
<div class="section" id="setup"> <div class="section" id="setup">
<span id="id4"></span><h2>setup<a class="headerlink" href="#setup" title="Permalink to this headline"></a></h2> <span id="id11"></span><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. <p>Writes a JSON file containing key/value data, for use in templating.
Call this once before using the <a class="reference internal" href="#template"><em>template</em></a> module. Playbooks Call this once before using the <a class="reference internal" href="#template"><em>template</em></a> module. Playbooks
will execute this module automatically as the first step in each play will execute this module automatically as the first step in each play
@ -407,7 +416,7 @@ tell their source. All variables are then bubbled up to the caller.</p>
</div> </div>
</div> </div>
<div class="section" id="shell"> <div class="section" id="shell">
<span id="id5"></span><h2>shell<a class="headerlink" href="#shell" title="Permalink to this headline"></a></h2> <span id="id12"></span><h2>shell<a class="headerlink" href="#shell" title="Permalink to this headline"></a></h2>
<p>The shell module takes the command name followed by a list of <p>The shell module takes the command name followed by a list of
arguments, space delimited. It is almost exactly like the command module arguments, space delimited. It is almost exactly like the command module
but runs the command through the shell rather than directly.</p> but runs the command through the shell rather than directly.</p>
@ -425,7 +434,7 @@ command was running for.</p>
</div> </div>
</div> </div>
<div class="section" id="template"> <div class="section" id="template">
<span id="id6"></span><h2>template<a class="headerlink" href="#template" title="Permalink to this headline"></a></h2> <span id="id13"></span><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 <a class="reference internal" href="#setup"><em>setup</em></a> module <p>Templates a file out to a remote server. Call the <a class="reference internal" href="#setup"><em>setup</em></a> module
prior to usage if you are not running from a playbook. In addition to the options prior to usage if you are not running from a playbook. In addition to the options
listed below, the arguments available to the <cite>file</cite> module can also be passed to the copy listed below, the arguments available to the <cite>file</cite> module can also be passed to the copy
@ -445,7 +454,7 @@ be a relative or absolute path.</li>
</div> </div>
</div> </div>
<div class="section" id="user"> <div class="section" id="user">
<span id="id7"></span><h2>user<a class="headerlink" href="#user" title="Permalink to this headline"></a></h2> <span id="id14"></span><h2>user<a class="headerlink" href="#user" title="Permalink to this headline"></a></h2>
<p>Creates user accounts, manipulates existing user accounts, and removes user accounts.</p> <p>Creates user accounts, manipulates existing user accounts, and removes user accounts.</p>
<p><em>name</em>:</p> <p><em>name</em>:</p>
<ul class="simple"> <ul class="simple">
@ -497,8 +506,45 @@ user name=mdehaan groups=wheel,skynet
user name=mdehaan state=absent force=yes</pre> user name=mdehaan state=absent force=yes</pre>
</div> </div>
</div> </div>
<div class="section" id="virt">
<span id="id15"></span><h2>virt<a class="headerlink" href="#virt" title="Permalink to this headline"></a></h2>
<p>Manages virtual machines supported by libvirt. Requires that libvirt be installed
on the managed machine.</p>
<p><em>guest</em>:</p>
<ul class="simple">
<li>The name of the guest VM being managed</li>
</ul>
<p><em>state</em></p>
<ul class="simple">
<li>Desired state of the VM. Either <cite>running</cite>, <cite>shutdown</cite>, <cite>destroyed</cite>, or <cite>undefined</cite>. Note that there may be some lag for state requests like &#8216;shutdown&#8217;, and these states only refer to the virtual machine states. After starting a guest, the guest OS may not be immediately accessible.</li>
</ul>
<p><em>command</em>:</p>
<ul class="simple">
<li>In addition to state management, various non-idempotent commands are available for API and script usage (but don&#8217;t make much sense in a playbook). These mostly return information, though some also affect state. See examples below.</li>
</ul>
<p>Example action from Ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
<div class="highlight-python"><pre>virt guest=alpha state=running
virt guest=alpha state=shutdown
virt guest=alpha state=destroyed
virt guest=alpha state=undefined</pre>
</div>
<p>Example guest management commands from /usr/bin/ansible:</p>
<div class="highlight-python"><pre>ansible host -m virt -a "guest=foo command=status"
ansible host -m virt -a "guest=foo command=pause"
ansible host -m virt -a "guest=foo command=unpause"
ansible host -m virt -a "guest=foo command=get_xml"
ansible host -m virt -a "guest=foo command=autostart"</pre>
</div>
<p>Example host (hypervisor) management commands from /usr/bin/ansible:</p>
<div class="highlight-python"><pre>ansible host -m virt -a "freemem"
ansible host -m virt -a "list_vms"
ansible host -m virt -a "info"
ansible host -m virt -a "nodeinfo"
ansible host -m virt -a "virttype"</pre>
</div>
</div>
<div class="section" id="yum"> <div class="section" id="yum">
<span id="id8"></span><h2>yum<a class="headerlink" href="#yum" title="Permalink to this headline"></a></h2> <span id="id16"></span><h2>yum<a class="headerlink" href="#yum" title="Permalink to this headline"></a></h2>
<p>Will install, upgrade, remove, and list packages with the yum package manager.</p> <p>Will install, upgrade, remove, and list packages with the yum package manager.</p>
<p><em>pkg</em>:</p> <p><em>pkg</em>:</p>
<ul class="simple"> <ul class="simple">
@ -550,7 +596,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -241,7 +241,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -645,7 +645,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

View File

@ -35,7 +35,7 @@ noted, any given module does support change hooks.
Let's see what's available in the Ansible module library, out of the box: Let's see what's available in the Ansible module library, out of the box:
.. _command: .. _apt:
apt apt
``` ```
@ -48,13 +48,18 @@ Manages apt-packages (such as for Debian/Ubuntu).
*state*: *state*:
* Can be either 'installed' or 'removed'. NOTE: support for 'latest' (see yum, below) is in work. * Can be either 'installed', 'removed', or 'latest'.
Example action from Ansible :doc:`playbooks`:: Example action from Ansible :doc:`playbooks`::
apt pkg=foo ensure=removed apt pkg=foo ensure=removed
apt pkg=foo ensure=installed apt pkg=foo ensure=installed
apt pkg=foo ensure=latest
NOTE: the apt module cannot currently request installation of a specific software version, as the yum
module can. This should be available in a future release.
.. _command:
command command
``````` ```````
@ -79,6 +84,13 @@ Example action from Ansible :doc:`playbooks`::
command /sbin/shutdown -t now command /sbin/shutdown -t now
If you only want to run a command if a certain file does not exist, you can do the
following::
command /usr/bin/make_database.sh arg1 arg2 creates=/path/to/database
The `creates=` option will not be passed to the executable.
.. _copy: .. _copy:
@ -121,6 +133,8 @@ support change hooks, nor does it make any changes on the system.
Playbooks do not actually use this module, they use the :ref:`setup` Playbooks do not actually use this module, they use the :ref:`setup`
module behind the scenes. module behind the scenes.
.. _file:
file file
```` ````
@ -164,6 +178,8 @@ Example action from Ansible :doc:`playbooks`::
file path=/path/to/delete state=absent file path=/path/to/delete state=absent
file src=/file/to/link/to dest=/path/to/symlink owner=foo group=foo state=link file src=/file/to/link/to dest=/path/to/symlink owner=foo group=foo state=link
.. _git:
git git
``` ```
@ -186,6 +202,7 @@ 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
.. _group:
group group
````` `````
@ -210,6 +227,8 @@ Example action from Ansible :doc:`playbooks`::
group name=somegroup state=present group name=somegroup state=present
.. _ohai:
ohai ohai
```` ````
@ -224,6 +243,8 @@ support change hooks, nor does it make any changes on the system.
Playbooks should not call the ohai module, playbooks call the Playbooks should not call the ohai module, playbooks call the
:ref:`setup` module behind the scenes instead. :ref:`setup` module behind the scenes instead.
.. _ping:
ping ping
```` ````
@ -234,6 +255,7 @@ This module does not support change hooks and is informative only - it
takes no parameters & does not support change hooks, nor does it make takes no parameters & does not support change hooks, nor does it make
any changes on the system. any changes on the system.
.. _service:
service service
``````` ```````
@ -398,6 +420,49 @@ Example action from Ansible :doc:`playbooks`::
user name=mdehaan groups=wheel,skynet user name=mdehaan groups=wheel,skynet
user name=mdehaan state=absent force=yes user name=mdehaan state=absent force=yes
.. _virt:
virt
````
Manages virtual machines supported by libvirt. Requires that libvirt be installed
on the managed machine.
*guest*:
* The name of the guest VM being managed
*state*
* Desired state of the VM. Either `running`, `shutdown`, `destroyed`, or `undefined`. Note that there may be some lag for state requests like 'shutdown', and these states only refer to the virtual machine states. After starting a guest, the guest OS may not be immediately accessible.
*command*:
* In addition to state management, various non-idempotent commands are available for API and script usage (but don't make much sense in a playbook). These mostly return information, though some also affect state. See examples below.
Example action from Ansible :doc:`playbooks`::
virt guest=alpha state=running
virt guest=alpha state=shutdown
virt guest=alpha state=destroyed
virt guest=alpha state=undefined
Example guest management commands from /usr/bin/ansible::
ansible host -m virt -a "guest=foo command=status"
ansible host -m virt -a "guest=foo command=pause"
ansible host -m virt -a "guest=foo command=unpause"
ansible host -m virt -a "guest=foo command=get_xml"
ansible host -m virt -a "guest=foo command=autostart"
Example host (hypervisor) management commands from /usr/bin/ansible::
ansible host -m virt -a "freemem"
ansible host -m virt -a "list_vms"
ansible host -m virt -a "info"
ansible host -m virt -a "nodeinfo"
ansible host -m virt -a "virttype"
.. _yum: .. _yum:
yum yum

View File

@ -178,7 +178,7 @@ 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 Apr 04, 2012.<br/> Last updated on Apr 06, 2012.<br/>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
</p> </p>
</div> </div>

File diff suppressed because one or more lines are too long