Let me upgrade your docs

This commit is contained in:
Tim Bielawa
2012-03-07 11:35:18 -05:00
parent 7e0ff815b9
commit 5e453555e3
80 changed files with 11378 additions and 67 deletions

View File

@@ -0,0 +1,81 @@
<?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="id343184"></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.
This is the only module that does not use key=value style parameters.</p><div class="variablelist"><dl><dt><span class="term">
Example usage
</span></dt><dd>
/sbin/shutdown -t now
</dd></dl></div><p>This module does not support change hooks.</p><p>Returns the return code from the program as well as timing information.</p><p>(Async command running and command execution time limits are in plan.)</p></div><div class="refsect1" title="copy"><a id="_copy"></a><h2>copy</h2><p>The copy module moves a file on the local box to remote locations.</p><div class="variablelist"><dl><dt><span class="term">
<span class="strong"><strong>src=</strong></span>
</span></dt><dd>
Local absolute path to a file to copy to the remote server
</dd><dt><span class="term">
<span class="strong"><strong>dest=</strong></span>
</span></dt><dd>
Remote absolute path where the file should end up
</dd></dl></div><p>This module also returns md5sum information about the resultant file.</p></div><div class="refsect1" title="facter"><a id="_facter"></a><h2>facter</h2><p>Runs the discovery program <span class="emphasis"><em>facter</em></span> on the remote system, returning
JSON data that can be useful for inventory purposes.</p><p>Requires that <span class="emphasis"><em>facter</em></span> and <span class="emphasis"><em>ruby-json</em></span> 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="refsect1" title="file"><a id="_file"></a><h2>file</h2><p>Ensures the ownership and permissions of files are as desired.</p><p>Use copy or template first if you need to make sure a file is on the box.</p><p>In plan.</p></div><div class="refsect1" title="git"><a id="_git"></a><h2>git</h2><p>Deploys software from git checkouts.</p><div class="variablelist"><dl><dt><span class="term">
<span class="strong"><strong>repo=</strong></span>
</span></dt><dd>
git or http protocol address of the repo to checkout
</dd><dt><span class="term">
<span class="strong"><strong>dest=</strong></span>
</span></dt><dd>
where to check it out, an absolute directory path
</dd><dt><span class="term">
<span class="strong"><strong>version=</strong></span>
</span></dt><dd>
what version to check outeither the git SHA, the literal string <span class="emphasis"><em>HEAD</em></span>, or a tag name
</dd></dl></div></div><div class="refsect1" title="ohai"><a id="_ohai"></a><h2>ohai</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 <span class="emphasis"><em>ohai</em></span> 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="refsect1" title="ping"><a id="_ping"></a><h2>ping</h2><p>A trivial test module, this module always returns the integer <span class="emphasis"><em>1</em></span> 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="refsect1" title="service"><a id="_service"></a><h2>service</h2><p>Controls services on remote machines.</p><div class="variablelist"><dl><dt><span class="term">
<span class="strong"><strong>state=</strong></span>
</span></dt><dd>
Values are <span class="emphasis"><em>started</em></span>, <span class="emphasis"><em>stopped</em></span>, or <span class="emphasis"><em>restarted</em></span>. Started/stopped
are idempotent actions that will not run commands unless neccessary.
<span class="emphasis"><em>restarted</em></span> will always bounce the service
</dd><dt><span class="term">
<span class="strong"><strong>name=</strong></span>
</span></dt><dd>
The name of the service
</dd></dl></div></div><div class="refsect1" title="setup"><a id="_setup"></a><h2>setup</h2><p>Writes a JSON file containing key/value data, for use in templating.
Call this once before using the template modules, usually as the very
first step in your playbook.</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 <span class="emphasis"><em>facter_</em></span> and 'ohai_" so its easy to tell their source.</p><div class="variablelist"><dl><dt><span class="term">
<span class="strong"><strong>metadata=</strong></span>
</span></dt><dd>
Optionally overrides the default JSON file location of /etc/ansible/setup.
If used, also supply the metadata parameter to <span class="emphasis"><em>template</em></span>. Change if
running as a non-root remote user who does not have permissions on /etc/ansible.
</dd><dt><span class="term">
<span class="strong"><strong>anything=</strong></span>
</span></dt><dd>
any other parameters can be named basically anything, and set a key=value
pair in the JSON file for use in templating.
</dd></dl></div></div><div class="refsect1" title="template"><a id="_template"></a><h2>template</h2><p>Templates a file out to a remote server. Call the setup module prior to usage.</p><div class="variablelist"><dl><dt><span class="term">
<span class="strong"><strong>src=</strong></span>
</span></dt><dd>
path of a Jinja2 formatted template on the local server
</dd><dt><span class="term">
<span class="strong"><strong>dest</strong></span>
</span></dt><dd>
location to render the template on the remote server
</dd><dt><span class="term">
<span class="strong"><strong>metadata</strong></span>
</span></dt><dd>
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.
</dd></dl></div><p>This module also returns md5sum information about the resultant file.</p></div><div class="refsect1" title="user"><a id="_user"></a><h2>user</h2><p>This module is in plan.</p></div><div class="refsect1" title="yum"><a id="_yum"></a><h2>yum</h2><p>This module is in plan.</p></div><div class="refsect1" title="WRITING YOUR OWN MODULES"><a id="_writing_your_own_modules"></a><h2>WRITING YOUR OWN MODULES</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.
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 <span class="emphasis"><em>failure</em></span> element with a True value.</p></div><div class="refsect1" title="ENVIRONMENT"><a id="_environment"></a><h2>ENVIRONMENT</h2><p>ANSIBLE_LIBRARYOverride the default ansible module library path</p></div><div class="refsect1" title="AUTHOR"><a id="_author"></a><h2>AUTHOR</h2><p>Ansible was originally written by Michael DeHaan. See the AUTHORS file
for a complete list of contributors.</p></div><div class="refsect1" title="SEE ALSO"><a id="_see_also"></a><h2>SEE ALSO</h2><p><span class="strong"><strong>ansible</strong></span>(1)</p><p><span class="strong"><strong>ansible-playbook</strong></span>(5)</p><p>Ansible home page: <a class="ulink" href="https://github.com/mpdehaan/ansible/" target="_top">https://github.com/mpdehaan/ansible/</a></p></div></div></body></html>

View File

@@ -0,0 +1,36 @@
<?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="id322567"></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>
</li><li class="listitem">
<a class="ulink" href="https://github.com/mpdehaan/ansible/blob/master/examples/base.yml" target="_top">https://github.com/mpdehaan/ansible/blob/master/examples/base.yml</a>
</li><li class="listitem">
<a class="ulink" href="https://github.com/mpdehaan/ansible/blob/master/examples/handlers.yml" target="_top">https://github.com/mpdehaan/ansible/blob/master/examples/handlers.yml</a>
</li></ul></div></div><div class="refsect1" title="WHAT THE EXAMPLE MEANS"><a id="_what_the_example_means"></a><h2>WHAT THE EXAMPLE MEANS</h2><p>Heres what playbook.yml (above) will do.</p><p>The first pattern will select all hosts. The patterns are the same
as supported by /usr/bin/ansible.</p><p>First, it will run all the modules specified in base.yml. Includes can
be used to implement classes of things, and if you wanted, a playbook
could consist of nothing but include files. This is an example of an
include.</p><p>After processing base.yml, on each host well write for
a JSON file into /etc/ansible/setup on each remote system with the
values max_clients and http_port.</p><p>Next, well use a Jinja2 template locally residing at
/srv/templates/httpd.j2 to write the Apache config file on each host,
using the previous values in that setup file.</p><p>Next, Well ensure that apache is running if stopped.</p><p>The template task set up a notifier, which means if the configuration
file actually changed, we have a named handler, in this case, <span class="emphasis"><em>restart apache</em></span>
to run. In this case, all the notifiers come from handlers.yml, though its
also ok to express handlers directly in the main yaml file too. Using
the include promotes reuse.</p><p>What does the handler say? If and only if the config file changed, note that we need to restart
apache at the end of the run, otherwise, dont bother because we
already know it is running.</p></div><div class="refsect1" title="HIGH LEVEL EXPLANATION"><a id="_high_level_explanation"></a><h2>HIGH LEVEL EXPLANATION</h2><p>Playbooks are executed top down and can contain multiple references to
patterns. For instance, a playbook could do something to all
webservers, then do something to all database servers, then do
something different to all webservers again.</p><p>For each pattern, the tasks in the <span class="emphasis"><em>tasks</em></span> list are executed in order
for all hosts in the host file matching the pattern.</p><p>For each task, a name/action pair describes what the task is and what
ansible module to use to accomplish the task, along with any
arguments. Additional fields like <span class="emphasis"><em>comment:</em></span> can be added and will
be ignored, so feel free to take notes in the file.</p><p>Most modules accept key=value format arguments.</p><p>Handlers are like tasks, but are conditionally executed. If a module
reports a <span class="emphasis"><em>change</em></span>, it can notify one or more handler by name. If
notified, it will run only for hosts that changed.</p></div><div class="refsect1" title="ERROR HANDLING"><a id="_error_handling"></a><h2>ERROR HANDLING</h2><p>If a host has a failure, the host will be ignored for the remainder
of the playbook execution.</p></div><div class="refsect1" title="ENVIRONMENT"><a id="_environment"></a><h2>ENVIRONMENT</h2><p>ANSIBLE_LIBRARYOverride the default ansible module library path</p></div><div class="refsect1" title="AUTHOR"><a id="_author"></a><h2>AUTHOR</h2><p>Ansible was originally written by Michael DeHaan. See the AUTHORS file
for a complete list of contributors.</p></div><div class="refsect1" title="SEE ALSO"><a id="_see_also"></a><h2>SEE ALSO</h2><p><span class="strong"><strong>ansible</strong></span>(1)</p><p><span class="strong"><strong>ansible-modules</strong></span>(5)</p><p>Ansible home page: <a class="ulink" href="https://github.com/mpdehaan/ansible/" target="_top">https://github.com/mpdehaan/ansible/</a></p></div></div></body></html>

30
html/man/ansible.1.html Normal file
View File

@@ -0,0 +1,30 @@
<?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="id415376"></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>
A name of a group in the inventory file, a shell-like glob selecting hosts in inventory
file, or any combination of the two seperated by semicolons.
</dd></dl></div></div><div class="refsect1" title="OPTIONS"><a id="_options"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">
<span class="strong"><strong>-i</strong></span>, <span class="strong"><strong>--inventory</strong></span>
</span></dt><dd>
Path to the inventory hosts file, which defaults to /etc/ansible/hosts.
</dd><dt><span class="term">
<span class="strong"><strong>-f</strong></span>, <span class="strong"><strong>--forks</strong></span>
</span></dt><dd>
Level of parallelism. Specify as an integer, the default is 5.
</dd><dt><span class="term">
<span class="strong"><strong>-m</strong></span>, <span class="strong"><strong>--module-name</strong></span>
</span></dt><dd>
Module name to execute.
</dd><dt><span class="term">
<span class="strong"><strong>-p</strong></span>, <span class="strong"><strong>--pattern</strong></span>
</span></dt><dd>
Hostname pattern. Accepts shell-like globs which can be seperated with ";"
The default is "*" which matches all hosts in the ansible hosts file. Group
names from the ansible inventory file can also be used.
</dd></dl></div><p>See ansible --help for additional options.</p></div><div class="refsect1" title="INVENTORY"><a id="_inventory"></a><h2>INVENTORY</h2><p>Ansible stores the hosts it can potentially operate on in an inventory
file. The syntax is one host per line. Groups headers are allowed and
are included on their own line, enclosed in square brackets.</p></div><div class="refsect1" title="FILES"><a id="_files"></a><h2>FILES</h2><p>/etc/ansible/hostsDefault hosts file</p><p>/usr/share/ansibleDefault module library</p></div><div class="refsect1" title="ENVIRONMENT"><a id="_environment"></a><h2>ENVIRONMENT</h2><p>The following environment variables may specified.</p><p>ANSIBLE_HOSTS Override the default ansible hosts file</p><p>ANSIBLE_LIBRARYOverride the default ansible module library path</p></div><div class="refsect1" title="AUTHOR"><a id="_author"></a><h2>AUTHOR</h2><p>Ansible was originally written by Michael DeHaan. See the AUTHORS file
for a complete list of contributors.</p></div><div class="refsect1" title="COPYRIGHT"><a id="_copyright"></a><h2>COPYRIGHT</h2><p>Copyright © 2012, Michael DeHaan</p><p>Ansible is released under the terms of the GPLv3 License.</p></div><div class="refsect1" title="SEE ALSO"><a id="_see_also"></a><h2>SEE ALSO</h2><p>Ansible home page: <a class="ulink" href="https://github.com/mpdehaan/ansible/" target="_top">https://github.com/mpdehaan/ansible/</a></p><p><span class="strong"><strong>ansible-modules</strong></span>(5)</p><p><span class="strong"><strong>ansible-playbook</strong></span>(5)</p></div></div></body></html>