rebuild from various pull requests
This commit is contained in:
parent
0725dd8dc8
commit
4a2bf7f60a
3 changed files with 64 additions and 54 deletions
85
modules.html
85
modules.html
|
@ -406,7 +406,7 @@ apt pkg=openjdk-6-jdk state=latest install-recommends=no</pre>
|
|||
<p>Assembles a configuration file from fragments. Often a particular
|
||||
program will take a single configuration file and does not support a
|
||||
conf.d style structure where it is easy to build up the configuration
|
||||
from multiple sources. Assmeble will take a directory of files that
|
||||
from multiple sources. Assemble will take a directory of files that
|
||||
have already been transferred to the system, and concatenate them
|
||||
together to produce a destination file. Files are assembled in string
|
||||
sorting order. Puppet calls this idea “fragments”.</p>
|
||||
|
@ -435,7 +435,13 @@ sorting order. Puppet calls this idea “fragments”.</p>
|
|||
<td> </td>
|
||||
<td>A file to create using the concatenation of all of the source files</td>
|
||||
</tr>
|
||||
<tr class="row-even"><td>OTHERS</td>
|
||||
<tr class="row-even"><td>backup</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td>Create a backup file including the timestamp information so you can
|
||||
get the original file back if you somehow clobbered it incorrectly.</td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td>OTHERS</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>All arguments that the file module takes may also be used</td>
|
||||
|
@ -573,7 +579,13 @@ relative.</td>
|
|||
<td> </td>
|
||||
<td>Remote absolute path where the file should end up</td>
|
||||
</tr>
|
||||
<tr class="row-even"><td>OTHERS</td>
|
||||
<tr class="row-even"><td>backup</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td>Create a backup file including the timestamp information so you can
|
||||
get the original file back if you somehow clobbered it incorrectly.</td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td>OTHERS</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>All arguments the file module takes are also supported</td>
|
||||
|
@ -583,6 +595,9 @@ relative.</td>
|
|||
<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>
|
||||
<p>Copy a new ntp.conf file into place, backing up the original if it differs from the copied version:</p>
|
||||
<div class="highlight-python"><pre>copy src=/srv/myfiles/ntp.conf dest=/etc/ntp.conf owner=root group=root mode=644 backup=yes</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="easy-install">
|
||||
<span id="id7"></span><h2><a class="toc-backref" href="#contents">easy_install</a><a class="headerlink" href="#easy-install" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -975,6 +990,12 @@ specified regular expression. Two special values are available: BOF for
|
|||
inserting the line at the beginning of the file, and EOF for inserting the
|
||||
line at the end of the file.</td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td>backup</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td>Create a backup file including the timestamp information so you can
|
||||
get the original file back if you somehow clobbered it incorrectly.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Example action from Ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
|
||||
|
@ -1183,7 +1204,7 @@ finally fall back to using the MySQL default login of ‘root’ with no
|
|||
<div>mydb.*:INSERT,UPDATE/anotherdb.*:SELECT/yetanotherdb.*:ALL</div></blockquote>
|
||||
<p>Example action from Ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
|
||||
<div class="highlight-python"><pre>- name: Create database user
|
||||
action: mysql_user name=bob passwd=12345 priv=*.*:ALL state=present
|
||||
action: mysql_user name=bob password=12345 priv=*.*:ALL state=present
|
||||
|
||||
- name: Ensure no user named 'sally' exists, also passing in the auth credentials.
|
||||
action: mysql_user login_user=root login_password=123456 name=sally state=absent</pre>
|
||||
|
@ -1591,12 +1612,12 @@ happened and separately if the user was removed or not.</p>
|
|||
<div>INSERT,UPDATE/table:SELECT/anothertable:ALL</div></blockquote>
|
||||
<p>Example action from Ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
|
||||
<div class="highlight-python"><pre>- name: Create django user and grant access to database and products table
|
||||
postgresql_user db=acme user=django password=ceec4eif7ya privs=CONNECT/products:ALL
|
||||
postgresql_user db=acme user=django password=ceec4eif7ya priv=CONNECT/products:ALL
|
||||
|
||||
- name: Remove test user privileges from acme
|
||||
postgresql_user db=acme user=test privs=ALL/products:ALL state=absent fail_on_user=no
|
||||
postgresql_user db=acme user=test priv=ALL/products:ALL state=absent fail_on_user=no
|
||||
- name: Remove test user from test database and the cluster
|
||||
postgresql_user db=test user=test privs=ALL state=absent</pre>
|
||||
postgresql_user db=test user=test priv=ALL state=absent</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="raw">
|
||||
|
@ -1714,38 +1735,6 @@ service name=foo pattern=/usr/bin/foo state=started</pre>
|
|||
<span class="versionmodified">New in version 0.7.</span></p>
|
||||
<p>Configures the SELinux mode and policy. A reboot may be required after usage. Ansible will not issue this reboot but
|
||||
will let you know when it is required.</p>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
<col width="16%" />
|
||||
<col width="8%" />
|
||||
<col width="17%" />
|
||||
<col width="60%" />
|
||||
</colgroup>
|
||||
<thead valign="bottom">
|
||||
<tr class="row-odd"><th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody valign="top">
|
||||
<tr class="row-even"><td>policy</td>
|
||||
<td>yes</td>
|
||||
<td> </td>
|
||||
<td>name of the SELinux policy to use (example: ‘targeted’)</td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td>state</td>
|
||||
<td>yes</td>
|
||||
<td> </td>
|
||||
<td>the SELinux mode. ‘enforcing’, ‘permissive’, or ‘disabled’</td>
|
||||
</tr>
|
||||
<tr class="row-even"><td>conf</td>
|
||||
<td>no</td>
|
||||
<td>/etc/selinux/config</td>
|
||||
<td>path to the SELinux configuration file, if non-standard</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Example from Ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
|
||||
<div class="highlight-python"><pre>selinux policy=targeted state=enforcing
|
||||
selinux policy=targeted state=disabled</pre>
|
||||
|
@ -2013,6 +2002,10 @@ discarded. If no, this module will fail if it encounters modified files.</td>
|
|||
<div class="section" id="template">
|
||||
<span id="id33"></span><h2><a class="toc-backref" href="#contents">template</a><a class="headerlink" href="#template" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Templates a file out to a remote server.</p>
|
||||
<p>Templates are processed by the
|
||||
<a class="reference external" href="http://jinja.pocoo.org/docs/">Jinja2 templating language</a> -
|
||||
documentation on the template formatting can be found in the
|
||||
<a class="reference external" href="http://jinja.pocoo.org/docs/templates/">Template Designer Documentation</a></p>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
<col width="17%" />
|
||||
|
@ -2039,7 +2032,13 @@ a relative or absolute path.</td>
|
|||
<td> </td>
|
||||
<td>Location to render the template on the remote server</td>
|
||||
</tr>
|
||||
<tr class="row-even"><td>OTHERS</td>
|
||||
<tr class="row-even"><td>backup</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td>Create a backup file including the timestamp information so you can
|
||||
get the original file back if you somehow clobbered it incorrectly.</td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td>OTHERS</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>This module also supports all of the arguments to the file module</td>
|
||||
|
@ -2139,12 +2138,12 @@ system account. This setting cannot be changed on existing users.</td>
|
|||
<tr class="row-odd"><td>remove</td>
|
||||
<td> </td>
|
||||
<td>no</td>
|
||||
<td>when used with state=remove, behavior is as with userdel –remove</td>
|
||||
<td>when used with state=absent, behavior is as with userdel –remove</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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 password=awWxVV.JvmdHw createhome=yes
|
||||
user name=mdehaan groups=wheel,skynet
|
||||
user name=mdehaan state=absent force=yes</pre>
|
||||
</div>
|
||||
|
@ -2368,4 +2367,4 @@ yum name=httpd state=installed</pre>
|
|||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -378,16 +378,10 @@ them work just like you would expect. Simple:</p>
|
|||
</div>
|
||||
<p>The command and shell module care about return codes, so if you have a command
|
||||
who’s successful exit code is not zero, you may wish to do this:</p>
|
||||
<blockquote>
|
||||
<div><dl class="docutils">
|
||||
<dt>tasks:</dt>
|
||||
<dd><ul class="first last simple">
|
||||
<li>name: run this command and ignore the result
|
||||
action: shell /usr/bin/somecommand & /bin/true</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<div class="highlight-python"><pre>tasks:
|
||||
- name: run this command and ignore the result
|
||||
action: shell /usr/bin/somecommand & /bin/true</pre>
|
||||
</div>
|
||||
<p>Variables can be used in action lines. Suppose you defined
|
||||
a variable called ‘vhost’ in the ‘vars’ section, you could do this:</p>
|
||||
<div class="highlight-python"><pre>tasks:
|
||||
|
@ -487,6 +481,23 @@ of a play:</p>
|
|||
- include: handlers/handlers.yml</pre>
|
||||
</div>
|
||||
<p>You can mix in includes along with your regular non-included tasks and handlers.</p>
|
||||
<p>Includes can also be used to import one playbook file into another. This allows
|
||||
you to define a top-level playbook that is composed of other playbooks.</p>
|
||||
<p>For example:</p>
|
||||
<div class="highlight-python"><pre>- name: this is a play at the top level of a file
|
||||
hosts: all
|
||||
user: root
|
||||
tasks:
|
||||
- name: say hi
|
||||
tags: foo
|
||||
action: shell echo "hi..."
|
||||
|
||||
- include: load_balancers.yml
|
||||
- include: webservers.yml
|
||||
- include: dbservers.yml</pre>
|
||||
</div>
|
||||
<p>Note that you cannot do variable substitution when including one playbook
|
||||
inside another.</p>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">You can not conditionally path the location to an include file,
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue