1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Docs rebuild

This commit is contained in:
Michael DeHaan 2012-05-19 17:30:30 -04:00
parent 340faa5fde
commit abdd5c1060
15 changed files with 31 additions and 29 deletions

View file

@ -275,7 +275,7 @@ languages:
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -359,7 +359,7 @@ a conf.d file appropriately or something similar. Who knows?</p>
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -183,7 +183,7 @@ s.parentNode.insertBefore(ga, s);
<p>Here are some tips for making the most of Ansible.</p>
<div class="section" id="group-by-roles">
<h2>Group By Roles<a class="headerlink" href="#group-by-roles" title="Permalink to this headline"></a></h2>
<p>A system can be in multiple groups. See ref:<cite>patterns</cite>. Having groups named after things like
<p>A system can be in multiple groups. See <a class="reference internal" href="patterns.html"><em>Inventory &amp; Patterns</em></a>. Having groups named after things like
&#8216;webservers&#8217; and &#8216;dbservers&#8217; is repeated in the examples because it&#8217;s a very powerful concept.</p>
<p>This allows playbooks to target machines based on role, as well as to assign role specific variables
using the group variable system.</p>
@ -232,17 +232,17 @@ will require <cite>handlers</cite>, <cite>tasks</cite>, and <cite>templates</cit
</div>
<p>The tasks are individually broken out in &#8216;acme/tasks/setup.yml&#8217;, and handlers, which are common to all task files,
are contained in &#8216;acme/handlers/main.yml&#8217;. As a reminder, handlers are mostly just used to notify services to restart
when things change, and these are described in ref:<cite>playbooks</cite>.</p>
when things change, and these are described in <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>.</p>
<p>Including more than one setup file or more than one handlers file is of course legal.</p>
<p>Having playbooks be able to include other playbooks is coming in release 0.5.</p>
<p>Until then, to manage your entire site, simply execute all of your playbooks together, in the order desired.
You don&#8217;t have to do this though, it&#8217;s fine to select sections of your infrastructure to manage at a single time.
You don&#8217;t have to do this though. It&#8217;s fine to select sections of your infrastructure to manage at a single time.
You may wish to construct simple shell scripts to wrap calls to ansible-playbook.</p>
</div>
<div class="section" id="miscellaneous-tips">
<h2>Miscellaneous Tips<a class="headerlink" href="#miscellaneous-tips" title="Permalink to this headline"></a></h2>
<p>When you can do something simply, do something simply. Do not reach to use every feature of Ansible together, all
at once. Use what works for you. For example, you should probably not need &#8216;vars&#8217;, &#8216;vars_files&#8217;, &#8216;vars_prompt&#8217; and &#8216;&#8211;extra-vars&#8217; all at once, while also using an external inventory file.</p>
at once. Use what works for you. For example, you should probably not need <tt class="docutils literal"><span class="pre">vars</span></tt>, <tt class="docutils literal"><span class="pre">vars_files</span></tt>, <tt class="docutils literal"><span class="pre">vars_prompt</span></tt> and <tt class="docutils literal"><span class="pre">--extra-vars</span></tt> all at once, while also using an external inventory file.</p>
<p>Optimize for readability. Whitespace between sections of YAML documents and in between tasks is strongly encouraged,
as is usage of YAML comments, which start with &#8220;#&#8221;. It is also useful to comment at the top of each file the purpose of the individual file and the author, including email address.</p>
<p>It is possible to leave off the &#8220;name&#8221; for a given task, though it is recommended to provide
@ -289,7 +289,7 @@ This way you have an audit trail describing when and why you changed the rules a
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -382,7 +382,7 @@ a simplified syntax for this.</p>
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -386,7 +386,7 @@ tasks &#8211; whether for a QA sytem, build system, or anything you can think of
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -190,7 +190,7 @@ s.parentNode.insertBefore(ga, s);
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -236,7 +236,7 @@ $ git checkout -t origin/devel
$ cd ./ansible
$ source ./hacking/env-setup</pre>
</div>
<p>You can optionally specify an inventory file (see doc:<cite>patterns</cite>) other than /etc/ansible/hosts:</p>
<p>You can optionally specify an inventory file (see <a class="reference internal" href="patterns.html"><em>Inventory &amp; Patterns</em></a>) other than /etc/ansible/hosts:</p>
<div class="highlight-python"><pre>$ echo "127.0.0.1" &gt; ~/ansible_hosts
$ export ANSIBLE_HOSTS=~/ansible_hosts</pre>
</div>
@ -280,7 +280,7 @@ same version. This is perfectly safe to do.</p>
<div class="highlight-python"><pre>make debian</pre>
</div>
<p>An Arch PKGBUILD is available on <a class="reference external" href="https://aur.archlinux.org/packages.php?ID=58621">AUR</a>
If you have python3 installed on Arch, you probably want to symlink python to python2.:</p>
If you have python3 installed on Arch, you probably want to symlink python to python2:</p>
<div class="highlight-python"><pre>sudo ln -sf /usr/bin/python2 /usr/bin/python</pre>
</div>
<p>If you would like to package Ansible for Homebrew, BSD, or others,
@ -351,7 +351,7 @@ explore, but you already have a fully working infrastructure!</p>
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -447,7 +447,7 @@ Puppet Labs, and is now with <a class="reference external" href="http://rpath.co
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -455,7 +455,7 @@ Stop by the mailing list to inquire about requirements.</p>
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -465,17 +465,18 @@ using the &#8216;shell&#8217; or &#8216;command&#8217; module is much more appro
only output is returned. There is no error detection or change handler support
for this module.</p>
<p>Example from <cite>/usr/bin/ansible</cite> to bootstrap a legacy python 2.4 host:</p>
<blockquote>
<div>ansible newhost.example.com raw -a &#8220;yum install python-simplejson&#8221;</div></blockquote>
<div class="highlight-python"><pre>ansible newhost.example.com raw -a "yum install python-simplejson"</pre>
</div>
</div>
<div class="section" id="id9">
<h2>service<a class="headerlink" href="#id9" title="Permalink to this headline"></a></h2>
<p>Controls services on remote machines.</p>
<p><em>state</em>:</p>
<ul class="simple">
<li>Values are <tt class="docutils literal"><span class="pre">started</span></tt>, <tt class="docutils literal"><span class="pre">stopped</span></tt>, or <tt class="docutils literal"><span class="pre">restarted</span></tt>.
<li>Values are <tt class="docutils literal"><span class="pre">started</span></tt>, <tt class="docutils literal"><span class="pre">stopped</span></tt>, <tt class="docutils literal"><span class="pre">reloaded</span></tt>, or <tt class="docutils literal"><span class="pre">restarted</span></tt>.
Started/stopped are idempotent actions that will not run commands
unless necessary. <tt class="docutils literal"><span class="pre">restarted</span></tt> will always bounce the service.</li>
unless necessary. <tt class="docutils literal"><span class="pre">restarted</span></tt> will always bounce the service, <tt class="docutils literal"><span class="pre">reloaded</span></tt>
will always issue a reload.</li>
</ul>
<p><em>enabled</em>:</p>
<ul class="simple">
@ -493,7 +494,8 @@ Uses chkconfig or updates-rc.d as appropriate.</li>
<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
service name=httpd state=stopped
service name=httpd state=restarted</pre>
service name=httpd state=restarted
service name=httpd state=reloaded</pre>
</div>
</div>
<div class="section" id="setup">
@ -787,7 +789,7 @@ yum pkg=httpd state=installed</pre>
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -363,7 +363,7 @@ YAML:</p>
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -271,8 +271,8 @@ Just <cite>Control-C</cite> to kill it and run it again with <cite>-K</cite>.</p
<div class="highlight-python"><pre>$varname</pre>
</div>
<p>In templates, the full power of the Jinja2 templating language is also available, which looks like this:</p>
<blockquote>
<div>{{ varname }}</div></blockquote>
<div class="highlight-python"><pre>{{ varname }}</pre>
</div>
<p>The Jinja2 documentation provides information about how to construct loops and conditionals for those
who which to use more advanced templating. This is optional and the $varname format still works in template
files.</p>
@ -471,7 +471,7 @@ Let&#8217;s run a playbook using a parallelism level of 10:</p>
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -196,7 +196,7 @@ relevant, feel free to skip it. For many people, the features documented in <ci
be 90% or more of what they use in Ansible.</p>
<div class="section" id="accessing-complex-variable-data">
<h2>Accessing Complex Variable Data<a class="headerlink" href="#accessing-complex-variable-data" title="Permalink to this headline"></a></h2>
<p>Some provided facts, like networking information, are made available as nested datastructures. To access
<p>Some provided facts, like networking information, are made available as nested data structures. To access
them a simple &#8216;$foo&#8217; is not sufficient, but it is still easy to do. Here&#8217;s how we get an IP address using
Ansible 0.4 and later:</p>
<div class="highlight-python"><pre>${ansible_eth0.ipv4.address}</pre>
@ -501,7 +501,7 @@ logs from ansible-pull runs would be an excellent way to gather and analyze remo
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

View file

@ -207,7 +207,7 @@ s.parentNode.insertBefore(ga, s);
</p>
<p>
&copy; Copyright 2012 Michael DeHaan.<br/>
Last updated on May 13, 2012.<br/>
Last updated on May 19, 2012.<br/>
</p>
</div>
</footer>

File diff suppressed because one or more lines are too long