mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Don't check in any module RST files as these are generated too.
This commit is contained in:
parent
e593c828b4
commit
a873e1a467
43 changed files with 0 additions and 2608 deletions
|
@ -1,48 +0,0 @@
|
|||
.. Generated by module_formatter
|
||||
.. include:: modules/apt.rst
|
||||
.. include:: modules/apt_repository.rst
|
||||
.. include:: modules/assemble.rst
|
||||
.. include:: modules/async_status.rst
|
||||
.. include:: modules/authorized_key.rst
|
||||
.. include:: modules/command.rst
|
||||
.. include:: modules/copy.rst
|
||||
.. include:: modules/cron.rst
|
||||
.. include:: modules/debug.rst
|
||||
.. include:: modules/easy_install.rst
|
||||
.. include:: modules/facter.rst
|
||||
.. include:: modules/fail.rst
|
||||
.. include:: modules/fetch.rst
|
||||
.. include:: modules/file.rst
|
||||
.. include:: modules/fireball.rst
|
||||
.. include:: modules/get_url.rst
|
||||
.. include:: modules/git.rst
|
||||
.. include:: modules/group.rst
|
||||
.. include:: modules/hpilo_boot.rst
|
||||
.. include:: modules/hpilo_facts.rst
|
||||
.. include:: modules/ini_file.rst
|
||||
.. include:: modules/lineinfile.rst
|
||||
.. include:: modules/mount.rst
|
||||
.. include:: modules/mysql_db.rst
|
||||
.. include:: modules/mysql_user.rst
|
||||
.. include:: modules/nagios.rst
|
||||
.. include:: modules/ohai.rst
|
||||
.. include:: modules/pause.rst
|
||||
.. include:: modules/ping.rst
|
||||
.. include:: modules/pip.rst
|
||||
.. include:: modules/postgresql_db.rst
|
||||
.. include:: modules/postgresql_user.rst
|
||||
.. include:: modules/raw.rst
|
||||
.. include:: modules/seboolean.rst
|
||||
.. include:: modules/selinux.rst
|
||||
.. include:: modules/service.rst
|
||||
.. include:: modules/setup.rst
|
||||
.. include:: modules/shell.rst
|
||||
.. include:: modules/slurp.rst
|
||||
.. include:: modules/subversion.rst
|
||||
.. include:: modules/supervisorctl.rst
|
||||
.. include:: modules/template.rst
|
||||
.. include:: modules/user.rst
|
||||
.. include:: modules/virt.rst
|
||||
.. include:: modules/vsphere_facts.rst
|
||||
.. include:: modules/wait_for.rst
|
||||
.. include:: modules/yum.rst
|
|
@ -1,92 +0,0 @@
|
|||
.. _apt:
|
||||
|
||||
apt
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.0.2
|
||||
|
||||
Manages apt-packages (such as for Debian/Ubuntu).
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>purge</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>Will force purging of configuration files if the module state is set to <code>absent</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>installed</li><li>latest</li><li>remove</li><li>absent</li><li>present</li></ul></td>
|
||||
<td>Indicates the desired package state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>force</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>If <code>yes</code>, force installs/removes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pkg</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>A package name or package specifier with version, like <code>foo</code> or <code>foo=1.0</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>update_cache</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>Run the equivalent of <code>apt-get update</code> before the operation. Can be run as part of the package installation or as a seperate step</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>default_release</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Corresponds to the <code>-t</code> option for <em>apt</em> and sets pin priorities</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>install_recommends</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>Corresponds to the <code>--no-install-recommends</code> option for <em>apt</em>, default behavior works as apt's default behavior, <code>no</code> does not install recommended packages. Suggested packages are never installed.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Update repositories cache and install <code>foo</code> package</p> <p><pre>
|
||||
apt pkg=foo update-cache=yes
|
||||
</pre></p>
|
||||
<p>Remove <code>foo</code> package</p> <p><pre>
|
||||
apt pkg=foo state=removed
|
||||
</pre></p>
|
||||
<p>Install the the package <code>foo</code></p> <p><pre>
|
||||
apt pkg=foo state=installed
|
||||
</pre></p>
|
||||
<p>Install the version '1.00' of package <code>foo</code></p> <p><pre>
|
||||
apt pkg=foo=1.00 state=installed
|
||||
</pre></p>
|
||||
<p>Update the repository cache and update package <code>ngnix</code> to latest version using default release <code>squeeze-backport</code></p> <p><pre>
|
||||
apt pkg=nginx state=latest default-release=squeeze-backports update-cache=yes
|
||||
</pre></p>
|
||||
<p>Install latest version of <code>openjdk-6-jdk</code> ignoring <code>install-recomands</code></p> <p><pre>
|
||||
apt pkg=openjdk-6-jdk state=latest install-recommends=no
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
.. _apt_repository:
|
||||
|
||||
apt_repository
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
Manages apt repositores (such as for Debian/Ubuntu).
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>repo</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The repository name/value</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>The repository state</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Add nginx stable repository from PPA</p> <p><pre>
|
||||
apt_repository repo=ppa://nginx/stable
|
||||
</pre></p>
|
||||
<p>Add specified repository into sources.</p> <p><pre>
|
||||
apt_repository repo='deb http://archive.canonical.com/ubuntu hardy partner'
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>This module works on Debian and Ubuntu only and requires <code>apt-add-repository</code> be available on destination server. To ensure this package is available use the <code>apt</code> module and install the <code>python-software-properties</code> package before using this module.</p>
|
||||
<p>A bug in <code>apt-add-repository</code> always adds <code>deb</code> and <code>deb-src</code> types for repositories (see the issue on Launchpad <a href='https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/987264'>https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/987264</a>), if a repo doesn't have source information (eg MongoDB repo from 10gen) the system will fail while updating repositories.</p>
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
.. _assemble:
|
||||
|
||||
assemble
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.5
|
||||
|
||||
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. 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*.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>A file to create using the concatenation of all of the source files.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>src</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>An already existing directory full of source files.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>backup</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>Create a backup file (if <code>yes</code>), including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>others</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>all arguments accepted by the <span class='module'>file</span> module also work here</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
assemble src=/etc/someapp/fragments dest=/etc/someapp/someapp.conf
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
.. _async_status:
|
||||
|
||||
async_status
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.5
|
||||
|
||||
This module gets the status of an asynchronous task. See: http://ansible.cc/docs/playbooks2.html#asynchronous-actions-and-polling
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>jid</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Job or task identifier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mode</td>
|
||||
<td>no</td>
|
||||
<td>status</td>
|
||||
<td><ul><li>status</li><li>cleanup</li></ul></td>
|
||||
<td>if <code>status</code>, obtain the status; if <code>cleanup</code>, clean up the async job cache located in <code>~/.ansible_async/</code> for the specified job <em>jid</em>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>See <a href='http://ansible.cc/docs/playbooks2.html#asynchronous-actions-and-polling'>http://ansible.cc/docs/playbooks2.html#asynchronous-actions-and-polling</a></p>
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
.. _authorized_key:
|
||||
|
||||
authorized_key
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.5
|
||||
|
||||
Adds or removes an SSH authorized key for a user from a remote host.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>whether the given key should or should not be in the file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Name of the user who should have access to the remote host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>key</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>the SSH public key, as a string</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
authorized_key user=charlie key="ssh-dss ASDF1234L+8BTwaRYr/rycsBF1D8e5pTxEsXHQs4iq+mZdyWqlW++L6pMiam1A8yweP+rKtgjK2httVS6GigVsuWWfOd7/sdWippefq74nppVUELHPKkaIOjJNN1zUHFoL/YMwAAAEBALnAsQN10TNGsRDe5arBsW8cTOjqLyYBcIqgPYTZW8zENErFxt7ij3fW3Jh/sCpnmy8rkS7FyK8ULX0PEy/2yDx8/5rXgMIICbRH/XaBy9Ud5bRBFVkEDu/r+rXP33wFPHjWjwvHAtfci1NRBAudQI/98DbcGQw5HmE89CjgZRo5ktkC5yu/8agEPocVjdHyZr7PaHfxZGUDGKtGRL2QzRYukCmWo1cZbMBHcI5FzImvTHS9/8B3SATjXMPgbfBuEeBwuBK5EjL+CtHY5bWs9kmYjmeo0KfUMH8hY4MAXDoKhQ7DhBPIrcjS5jPtoGxIREZjba67r6/P2XKXaCZH6Fc= charlie@example.org 2011-01-17"
|
||||
</pre></p>
|
||||
<p>Shorthand available in Ansible 0.8 and later</p> <p><pre>
|
||||
authorized_key user=charlie key=$FILE(/home/charlie/.ssh/id_rsa.pub)
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
.. _command:
|
||||
|
||||
command
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
The command module takes the command name followed by a list of space-delimited arguments.
|
||||
The given command will be executed on all selected nodes. It will not be processed through the shell, so variables like ``$HOME`` and operations like ``"<"``, ``">"``, ``"|"``, and ``"&"`` will not work. As such, all paths to commands must be fully qualified
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>creates</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>a filename, when it already exists, this step will <b>not</b> be run.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>free_form</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>the command module takes a free form command to run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>chdir</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>cd into this directory before running the command (added in Ansible 0.6)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>removes</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>a filename, when it does not exist, this step will <b>not</b> be run. (added in Ansible 0.8)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
command /sbin/shutdown -t now
|
||||
</pre></p>
|
||||
<p><em>creates</em>, <em>removes</em>, and <em>chdir</em> can be specified after the command. For instance, if you only want to run a command if a certain file does not exist, use this.</p> <p><pre>
|
||||
command /usr/bin/make_database.sh arg1 arg2 creates=/path/to/database
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>If you want to run a command through the shell (say you are using <code><</code>, <code>></code>, <code>|</code>, etc), you actually want the <span class='module'>shell</span> module instead. The <span class='module'>command</span> module is much more secure as it's not affected by the user's environment.</p>
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
.. _copy:
|
||||
|
||||
copy
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
The ``copy`` module copies a file on the local box to remote locations.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Remote absolute path where the file should be copied to.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>src</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Local path to a file to copy to the remote server; can be absolute or relative.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>backup</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. (added in Ansible 0.7)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>others</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>all arguments accepted by the <span class='module'>file</span> module also work here</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
copy src=/srv/myfiles/foo.conf dest=/etc/foo.conf owner=foo group=foo mode=0644
|
||||
</pre></p>
|
||||
<p>Copy a new <code>ntp.conf</code> file into place, backing up the original if it differs from the copied version</p> <p><pre>
|
||||
copy src=/mine/ntp.conf dest=/etc/ntp.conf owner=root group=root mode=644 backup=yes
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
.. _easy_install:
|
||||
|
||||
easy_install
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
Installs Python libraries, optionally in a *virtualenv*
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>virtualenv</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>an optional <em>virtualenv</em> directory path to install into. If the <em>virtualenv</em> does not exist, it is created automatically</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>A Python library name</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Examples from Ansible Playbooks</p> <p><pre>
|
||||
easy_install name=pip
|
||||
</pre></p>
|
||||
<p>Install <em>Flask</em> (<a href='http://flask.pocoo.org/'>http://flask.pocoo.org/</a>) into the specified <em>virtualenv</em></p> <p><pre>
|
||||
easy_install name=flask virtualenv=/webapps/myapp/venv
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Please note that the <span class='module'>easy_install</span> module can only install Python libraries. Thus this module is not able to remove libraries. It is generally recommended to use the <span class='module'>pip</span> module which you can first install using <span class='module'>easy_install</span>.</p>
|
||||
<p>Also note that <em>virtualenv</em> must be installed on the remote host if the <code>virtualenv</code> parameter is specified.</p>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
.. _facter:
|
||||
|
||||
facter
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.2
|
||||
|
||||
Runs the *facter* discovery program (https://github.com/puppetlabs/facter) on the remote system, returning JSON data that can be useful for inventory purposes.
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example command-line invocation</p> <p><pre>
|
||||
ansible www.example.net -m facter
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
.. _fail:
|
||||
|
||||
fail
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.8
|
||||
|
||||
This module fails the progress with a custom message. It can be useful for bailing out when a certain condition is met using only_if.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>msg</td>
|
||||
<td>no</td>
|
||||
<td>'Failed because only_if condition is true'</td>
|
||||
<td><ul></ul></td>
|
||||
<td>The customized message used for failing execution. If ommited, fail will simple bail out with a generic message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rc</td>
|
||||
<td>no</td>
|
||||
<td>1</td>
|
||||
<td><ul></ul></td>
|
||||
<td>The return code of the failure. This is currently not used by Ansible, but might be used in the future.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example playbook using fail and only_if together</p> <p><pre>
|
||||
action: fail msg="The system may not be provisioned according to the CMDB status." rc=100
|
||||
only_if: "'$cmdb_status' != 'to-be-staged'"
|
||||
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
.. _fetch:
|
||||
|
||||
fetch
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.2
|
||||
|
||||
This module works like ``copy``, but in reverse. It is used for fetching files from remote machines and storing them locally in a file tree, organized by hostname.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>A directory to save the file into. For example, if the <em>dest</em> directory is <code>/backup</code> a src file named <code>/etc/profile</code> on host <code>host.example.com</code>, would be saved into <code>/backup/host.example.com/etc/profile</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>src</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The file on the remote system to fetch. This must be a file, not a directory. Recursive fetching may be supported in a later release.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
fetch src=/var/log/messages dest=/home/logtree
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
.. _file:
|
||||
|
||||
file
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
Sets attributes of files, symlinks, and directories, or removes files/symlinks/directories. Many other modules support the same options as the file module - including ``copy``, ``template``, and ``assmeble``.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>src</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>path of the file to link to (applies only to <code>state=link</code>).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>group</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the group that should own the file/directory, as would be fed to <em>chown</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>defines the file being managed, unless when used with <em>state=link</em>, and then sets the destination to create a symbolic link to using <em>src</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>selevel</td>
|
||||
<td>no</td>
|
||||
<td>s0</td>
|
||||
<td><ul></ul></td>
|
||||
<td>level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the <code>range</code>. <code>_default</code> feature works as for <em>seuser</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>seuser</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>user part of SELinux file context. Will default to system policy, if applicable. If set to <code>_default</code>, it will use the <code>user</code> portion of the the policy if available</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>file</td>
|
||||
<td><ul><li>file</li><li>link</li><li>directory</li><li>absent</li></ul></td>
|
||||
<td>If <code>directory</code>, all immediate subdirectories will be created if they do not exist. If <code>file</code>, the file will NOT be created if it does not exist, see the <span class='module'>copy</span> or <span class='module'>template</span> module if you want that behavior. If <code>link</code>, the symbolic link will be created or changed. If <code>absent</code>, directories will be recursively deleted, and files or symlinks will be unlinked.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>serole</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>role part of SELinux file context, <code>_default</code> feature works as for <em>seuser</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mode</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>mode the file or directory should be, such as 0644 as would be fed to</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>context</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul><li>default</li></ul></td>
|
||||
<td>accepts only <code>default</code> as value. This will restore a file's SELinux context in the policy. Does nothing if no default value is available.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>owner</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the user that should own the file/directory, as would be fed to <em>chown</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>force</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>force is required when changing an existing file to a directory, or a link to a directory, and so on. Use this with caution.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>setype</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>type part of SELinux file context, <code>_default</code> feature works as for <em>seuser</em>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
file path=/etc/foo.conf owner=foo group=foo mode=0644
|
||||
</pre></p>
|
||||
<p><pre>
|
||||
file src=/file/to/link/to dest=/path/to/symlink owner=foo group=foo state=link
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>See also <span class='module'>copy</span>, <span class='module'>template</span>, <span class='module'>assemble</span></p>
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
.. _fireball:
|
||||
|
||||
fireball
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.9
|
||||
|
||||
This modules launches an ephemeral *fireball* ZeroMQ message bus daemon on the remote node which Ansible can to communicate with nodes at high speed.
|
||||
The daemon listens on a configurable port for a configurable amount of time.
|
||||
Starting a new fireball as a given user terminates any existing user fireballs.
|
||||
Fireball mode is AES encrypted
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>minutes</td>
|
||||
<td>no</td>
|
||||
<td>30</td>
|
||||
<td><ul></ul></td>
|
||||
<td>The <em>fireball</em> listener daemon is started on nodes and will stay around for this number of minutes before turning itself off.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>port</td>
|
||||
<td>no</td>
|
||||
<td>5099</td>
|
||||
<td><ul></ul></td>
|
||||
<td>TCP port for ZeroMQ</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>This example playbook has two plays: the first launches <em>fireball</em> mode on all hosts via SSH, and the second actually starts using <em>fireball</em> node for subsequent management over the fireball interface</p> <p><pre>
|
||||
- hosts: devservers
|
||||
gather_facts: false
|
||||
connection: ssh
|
||||
sudo: yes
|
||||
tasks:
|
||||
- action: fireball
|
||||
|
||||
- hosts: devservers
|
||||
connection: fireball
|
||||
tasks:
|
||||
- action: command /usr/bin/anything
|
||||
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>See the advanced playbooks chapter for more about using fireball mode.</p>
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
.. _get_url:
|
||||
|
||||
get_url
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
Downloads files from HTTP, HTTPS, or FTP to the remote server. The remote server must have direct access to the remote resource.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>url</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>HTTP, HTTPS, or FTP URL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>absolute path of where to download the file to.If <em>dest</em> is a directory, the basename of the file on the remote server will be used. If a directory, <em>thirsty=yes</em> must also be set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>thirsty</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>if <code>yes</code>, will download the file every time and replace the file if the contents change. if <code>no</code>, the file will only be downloaded if the destination does not exist. Generally should be <code>yes</code> only for small local files. prior to 0.6, acts if <code>yes</code> by default. (added in Ansible 0.7)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>others</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>all arguments accepted by the <span class='module'>file</span> module also work here</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
get_url url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>This module doesn't yet support configuration for proxies or passwords.</p>
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
.. _git:
|
||||
|
||||
git
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.0.1
|
||||
|
||||
Manage git checkouts of repositories to deploy files or software.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>repo</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>git, ssh, or http protocol address of the git repository.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Absolute path of where the repository should be checked out to.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>no</td>
|
||||
<td>HEAD</td>
|
||||
<td><ul></ul></td>
|
||||
<td>What version of the repository to check out. This can be the git <em>SHA</em>, the literal string <em>HEAD</em>, branch name, or a tag name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>force</td>
|
||||
<td>no</td>
|
||||
<td>yes</td>
|
||||
<td><ul><li>True</li><li>False</li></ul></td>
|
||||
<td>(New in 0.7) If yes, any modified files in the working repository will be discarded. Prior to 0.7, this was always 'yes' and could not be disabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>remote</td>
|
||||
<td>no</td>
|
||||
<td>origin</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Name of the remote branch.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example git checkout from Ansible Playbooks</p> <p><pre>
|
||||
git repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout version=release-0.22
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
.. _group:
|
||||
|
||||
group
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.0.2
|
||||
|
||||
Manage presence of groups on a host.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>Whether the group should be present or not on the remote host.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>gid</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optional <em>GID</em> to set for the group.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Name of the group to manage.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>system</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>True</li><li>False</li></ul></td>
|
||||
<td>If <em>yes</em>, indicates that the group created is a system group.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example group command from Ansible Playbooks</p> <p><pre>
|
||||
group name=somegroup state=present
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
.. _ini_file:
|
||||
|
||||
ini_file
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.9
|
||||
|
||||
Manage (add, remove, change) individual settings in an INI-style file without having to manage the file as a whole with, say, ``template`` or ``assemble``. Adds missing sections if they don't exist.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>option</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>if set (required for changing a <em>value</em>), this is the name of the option.May be omitted if adding/removing a whole <em>section</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>others</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>all arguments accepted by the <span class='module'>file</span> module also work here</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Path to the INI-style file; this file is created if required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>section</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Section name in INI file. This is added if <code>state=present</code> automatically when a single value is being set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>backup</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></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>
|
||||
<td>value</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>the string value to be associated with an <em>option</em>. May be omitted when removing an <em>option</em>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Ensure <code>fav=lemonade</code> is in section <code>[drinks]</code> in said file</p> <p><pre>
|
||||
ini_file dest=/etc/conf section=drinks option=fav value=lemonade mode=0600 backup=true
|
||||
</pre></p>
|
||||
<p><pre>
|
||||
ini_file dest=/etc/anotherconf
|
||||
section=drinks
|
||||
option=temperature
|
||||
value=cold
|
||||
backup=true
|
||||
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>While it is possible to add an <em>option</em> without specifying a <em>value</em>, this makes no sense.</p>
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
.. _lineinfile:
|
||||
|
||||
lineinfile
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
This module will search a file for a line, and ensure that it is present or absent.
|
||||
This is primarily useful when you want to change a single line in a file only. For other cases, see the ``copy`` or ``template`` modules.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>insertafter</td>
|
||||
<td>no</td>
|
||||
<td>EOF</td>
|
||||
<td><ul><li>BOF</li><li>EOF</li></ul></td>
|
||||
<td>Used with <code>state=present</code>. If specified, the line will be inserted after the specified regular expression. Two special values are available; <code>BOF</code> for inserting the line at the beginning of the file, and <code>EOF</code> for inserting the line at the end of the file.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>Whether the line should be there or not.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The file to modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>regexp</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The regular expression to look for in the file. For <code>state=present</code>, the pattern to replace. For <code>state=absent</code>, the pattern of the line to remove.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>line</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Required for <code>state=present</code>. The line to insert/replace into the file. Must match the value given to <code>regexp</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>backup</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></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>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p><pre>
|
||||
lineinfile dest=/etc/selinux/config regexp=^SELINUX= line=SELINUX=disabled
|
||||
</pre></p>
|
||||
<p><pre>
|
||||
lineinfile dest=/etc/sudoers state=absent regexp="^%wheel"
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
.. _mount:
|
||||
|
||||
mount
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
This module controls active and configured mount points in ``/etc/fstab``.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>src</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>device to be mounted on <em>name</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul><li>present</li><li>absent</li><li>mounted</li><li>unmounted</li></ul></td>
|
||||
<td>If <code>mounted</code> or <code>unmounted</code>, the device will be actively mounted or unmounted as well as just configured in <em>fstab</em>. <code>absent</code> and <code>present</code> only deal with <em>fstab</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>path to the mount point, eg: <code>/mnt/files</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dump</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>dump (see fstab(8))</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>passno</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>passno (see fstab(8))</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>opts</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>mount options (see fstab(8))</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fstype</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>file-system type</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Mount DVD read-only</p> <p><pre>
|
||||
mount name=/mnt/dvd src=/dev/sr0 fstype=iso9660 opts=ro
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
.. _mysql_db:
|
||||
|
||||
mysql_db
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
Add or remove MySQL databases from a remote host.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>The database state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the database to add or remove</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encoding</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Encoding mode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>collation</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Collation mode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_user</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The username used to authenticate with</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_host</td>
|
||||
<td>no</td>
|
||||
<td>localhost</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Host running the database</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_password</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The password used to authenticate with</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Create a new database with name 'bobdata'</p> <p><pre>
|
||||
mysql_db db=bobdata state=present
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Requires the MySQLdb Python package on the remote host. For Ubuntu, this is as easy as apt-get install python-mysqldb.</p>
|
||||
<p>Both <code>login_password</code> and <code>login_username</code> are required when you are passing credentials. If none are present, the module will attempt to read the credentials from <code>~/.my.cnf</code>, and finally fall back to using the MySQL default login of 'root' with no password.</p>
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
.. _mysql_user:
|
||||
|
||||
mysql_user
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
Adds or removes a user from a MySQL database.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the user (role) to add or remove</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_user</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The username used to authenticate with</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_host</td>
|
||||
<td>no</td>
|
||||
<td>localhost</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Host running the database</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>host</td>
|
||||
<td>no</td>
|
||||
<td>localhost</td>
|
||||
<td><ul></ul></td>
|
||||
<td>the 'host' part of the MySQL username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>The database state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_password</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The password used to authenticate with</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>set the user's password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>priv</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>MySQL privileges string in the format: <code>db.table:priv1,priv2</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Create database user with name 'bob' and password '12345' with all database privileges</p> <p><pre>
|
||||
mysql_user name=bob password=12345 priv=*.*:ALL state=present
|
||||
</pre></p>
|
||||
<p>Ensure no user named 'sally' exists, also passing in the auth credentials.</p> <p><pre>
|
||||
mysql_user login_user=root login_password=123456 name=sally state=absent
|
||||
</pre></p>
|
||||
<p>Example privileges string format</p> <p><pre>
|
||||
mydb.*:INSERT,UPDATE/anotherdb.*:SELECT/yetanotherdb.*:ALL
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Requires the MySQLdb Python package on the remote host. For Ubuntu, this is as easy as apt-get install python-mysqldb.</p>
|
||||
<p>Both <code>login_password</code> and <code>login_username</code> are required when you are passing credentials. If none are present, the module will attempt to read the credentials from <code>~/.my.cnf</code>, and finally fall back to using the MySQL default login of 'root' with no password.</p>
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
.. _nagios:
|
||||
|
||||
nagios
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
The ``nagios`` module has two basic functions: scheduling downtime and toggling alerts for services or hosts.
|
||||
All actions require the ``host`` parameter to be given explicitly. In playbooks you can use the ``$inventory_hostname`` variable to refer to the host the playbook is currently running on.
|
||||
You can specify multiple services at once by separating them with commas, .e.g., ``services=httpd,nfs,puppet``.
|
||||
When specifying what service to handle there is a special service value, *host*, which will handle alerts/downtime for the *host itself*, e.g., ``service=host``. This keyword may not be given with other services at the same time. *Setting alerts/downtime for a host does not affect alerts/downtime for any of the services running on it.*
|
||||
When using the ``nagios`` module you will need to specify your nagios server using the ``delegate_to`` parameter.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>action</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul><li>downtime</li><li>enable_alerts</li><li>disable_alerts</li><li>silence</li><li>unsilence</li></ul></td>
|
||||
<td>Action to take.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>host</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Host to operate on in Nagios.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>author</td>
|
||||
<td>no</td>
|
||||
<td>Ansible</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Author to leave downtime comments as. - Only useable with the <code>downtime</code> action.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>services</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>What to manage downtime/alerts for. Separate multiple services with commas.<code>service</code> is an alias for <code>services</code>.<b>Required</b> option when using the <code>downtime</code>, <code>enable_alerts</code>, and <code>disable_alerts</code> actions.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>minutes</td>
|
||||
<td>no</td>
|
||||
<td>30</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Minutes to schedule downtime for.Only useable with the <code>downtime</code> action.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>cmdfile</td>
|
||||
<td>no</td>
|
||||
<td>auto-detected</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Path to the nagios <em>command file</em> (FIFO pipe).Only required if auto-detection fails.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>set 30 minutes of apache downtime</p> <p><pre>
|
||||
nagios action=downtime minutes=30 service=httpd host=$inventory_hostname
|
||||
</pre></p>
|
||||
<p>schedule an hour of HOST downtime</p> <p><pre>
|
||||
nagios action=downtime minutes=60 service=host host=$inventory_hostname
|
||||
</pre></p>
|
||||
<p>schedule downtime for a few services</p> <p><pre>
|
||||
nagios action=downtime services=frob,foobar,qeuz host=$inventory_hostname
|
||||
</pre></p>
|
||||
<p>enable SMART disk alerts</p> <p><pre>
|
||||
nagios action=enable_alerts service=smart host=$inventory_hostname
|
||||
</pre></p>
|
||||
<p>two services at once: disable httpd and nfs alerts</p> <p><pre>
|
||||
nagios action=disable_alerts service=httpd,nfs host=$inventory_hostname
|
||||
</pre></p>
|
||||
<p>disable HOST alerts</p> <p><pre>
|
||||
nagios action=disable_alerts service=host host=$inventory_hostname
|
||||
</pre></p>
|
||||
<p>silence ALL alerts</p> <p><pre>
|
||||
nagios action=silence host=$inventory_hostname
|
||||
</pre></p>
|
||||
<p>unsilence all alerts</p> <p><pre>
|
||||
nagios action=unsilence host=$inventory_hostname
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
.. _ohai:
|
||||
|
||||
ohai
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
Similar to the ``facter`` module, this runs the *ohai* discovery program (http://wiki.opscode.com/display/chef/Ohai) on the remote host and returns JSON inventory data. *Ohai* data is a bit more verbose and nested than *facter*.
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Retrieve <em>ohai</em> data from all Web servers and store in one-file per host</p> <p><pre>
|
||||
ansible webservers -m ohai --tree=/tmp/ohaidata
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
.. _pause:
|
||||
|
||||
pause
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.8
|
||||
|
||||
Pauses playbook execution for a set amount of time, or until a prompt is acknowledged. All parameters are optional. The default behavior is to pause with a prompt.
|
||||
You can use ``ctrl+c`` if you wish to advance a pause earlier than it is set to expire or if you need to abort a playbook run entirely. To continue early: press ``ctrl+c`` and then ``c``. To abort a playbook: press ``ctrl+c`` and then ``a``.
|
||||
The pause module integrates into async/parallelized playbooks without any special considerations (see also: Rolling Updates). When using pauses with the ``serial`` playbook parameter (as in rolling updates) you are only prompted once for the current group of hosts.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>seconds</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Number of minutes to pause for.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>minutes</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Number of minutes to pause for.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>prompt</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optional text to use for the prompt message.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Pause for 5 minutes to build app cache.</p> <p><pre>
|
||||
pause minutes=5
|
||||
</pre></p>
|
||||
<p>Pause until you can verify updates to an application were successful.</p> <p><pre>
|
||||
pause
|
||||
</pre></p>
|
||||
<p>A helpful reminder of what to look out for post-update.</p> <p><pre>
|
||||
pause prompt=Make sure org.foo.FooOverload exception is not present
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
.. _ping:
|
||||
|
||||
ping
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
A trivial test module, this module always returns 'pong' on successful contact. It does not make sense in playbooks, but is useful from ``/usr/bin/ansible``
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Test 'webservers' status</p> <p><pre>
|
||||
ansible webservers -m ping
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
.. _pip:
|
||||
|
||||
pip
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
Manage Python library dependencies.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>virtualenv</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>An optional path to a virtualenv directory to install into</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li><li>latest</li></ul></td>
|
||||
<td>The state of module</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The version number to install of the Python library specified in the 'name' parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>requirements</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The path to a pip requirements file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The name of a Python library to install</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Install <em>flask</em> python package.</p> <p><pre>
|
||||
pip name=flask
|
||||
</pre></p>
|
||||
<p>Install <em>flask</em> python package on version 0.8.</p> <p><pre>
|
||||
pip name=flask version=0.8
|
||||
</pre></p>
|
||||
<p>Install <em>Flask</em> (<a href='http://flask.pocoo.org/'>http://flask.pocoo.org/</a>) into the specified <em>virtualenv</em></p> <p><pre>
|
||||
pip name=flask virtualenv=/srv/webapps/my_app/venv
|
||||
</pre></p>
|
||||
<p>Install specified python requirements.</p> <p><pre>
|
||||
pip requirements=/srv/webapps/my_app/src/requirements.txt
|
||||
</pre></p>
|
||||
<p>Install specified python requirements in indicated virtualenv.</p> <p><pre>
|
||||
pip requirements=/srv/webapps/my_app/src/requirements.txt virtualenv=/srv/webapps/my_app/venv
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Please note that <a href='http://www.virtualenv.org/, virtualenv'>http://www.virtualenv.org/, virtualenv</a> must be installed on the remote host if the virtualenv parameter is specified.</p>
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
.. _postgresql_db:
|
||||
|
||||
postgresql_db
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
Add or remove PostgreSQL databases from a remote host.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>The database state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the database to add or remove</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_password</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The password used to authenticate with</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>owner</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Name of the role to set as owner of the database</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_user</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The username used to authenticate with</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_host</td>
|
||||
<td>no</td>
|
||||
<td>localhost</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Host running the database</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Create a new database with name 'acme'</p> <p><pre>
|
||||
postgresql_db db=acme
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>The default authentication assumes that you are either logging in as or sudo'ing to the postgres account on the host.</p>
|
||||
<p>This module uses psycopg2, a Python PostgreSQL database adapter. You must ensure that psycopg2 is installed on the host before using this module. If the remote host is the PostgreSQL server (which is the default case), then PostgreSQL must also be installed on the remote host. For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages on the remote host before using this module.</p>
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
.. _postgresql_user:
|
||||
|
||||
postgresql_user
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
Add or remove PostgreSQL users (roles) from a remote host and, optionally, grant the users access to an existing database or tables.
|
||||
The fundamental function of the module is to create, or delete, roles from a PostgreSQL cluster. Privilege assignment, or removal, is an optional step, which works on one database at a time. This allows for the module to be called several times in the same module to modify the permissions on different databases, or to grant permissions to already existing users.
|
||||
A user cannot be removed untill all the privileges have been stripped from the user. In such situation, if the module tries to remove the user it will fail. To avoid this from happening the fail_on_user option signals the module to try to remove the user, but if not possible keep going; the module will report if changes happened and separately if the user was removed or not.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the user (role) to add or remove</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_user</td>
|
||||
<td>no</td>
|
||||
<td>postgres</td>
|
||||
<td><ul></ul></td>
|
||||
<td>User (role) used to authenticate with PostgreSQL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_host</td>
|
||||
<td>no</td>
|
||||
<td>localhost</td>
|
||||
<td><ul></ul></td>
|
||||
<td>Host running PostgreSQL.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>db</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of database where permissions will be granted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>The database state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>login_password</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Password used to authenticate with PostgreSQL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>set the user's password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fail_on_user</td>
|
||||
<td>no</td>
|
||||
<td>True</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>if yes, fail when user can't be removed. Otherwise just log and continue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>priv</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>PostgreSQL privileges string in the format: <code>table:priv1,priv2</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Create django user and grant access to database and products table</p> <p><pre>
|
||||
postgresql_user db=acme user=django password=ceec4eif7ya priv=CONNECT/products:ALL
|
||||
</pre></p>
|
||||
<p>Remove test user privileges from acme</p> <p><pre>
|
||||
postgresql_user db=acme user=test priv=ALL/products:ALL state=absent fail_on_user=no
|
||||
</pre></p>
|
||||
<p>Remove test user from test database and the cluster</p> <p><pre>
|
||||
postgresql_user db=test user=test priv=ALL state=absent
|
||||
</pre></p>
|
||||
<p>Example privileges string format</p> <p><pre>
|
||||
INSERT,UPDATE/table:SELECT/anothertable:ALL
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>The default authentication assumes that you are either logging in as or sudo'ing to the postgres account on the host.</p>
|
||||
<p>This module uses psycopg2, a Python PostgreSQL database adapter. You must ensure that psycopg2 is installed on the host before using this module. If the remote host is the PostgreSQL server (which is the default case), then PostgreSQL must also be installed on the remote host. For Ubuntu-based systems, install the postgresql, libpq-dev, and python-psycopg2 packages on the remote host before using this module.</p>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
.. _raw:
|
||||
|
||||
raw
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
Executes a low-down and dirty SSH command, not going through the module subsystem. This is useful and should only be done in two cases. The first case is installing python-simplejson on older (Python 2.4 and before) hosts that need it as a dependency to run modules, since nearly all core modules require it. Another is speaking to any devices such as routers that do not have any Python installed. In any other case, using the ``shell`` or ``command`` module is much more appropriate. Arguments given to ``raw`` are run directly through the configured remote shell and only output is returned. There is no error detection or change handler support for this module
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from /usr/bin/ansible to bootstrap a legacy python 2.4 host</p> <p><pre>
|
||||
ansible newhost.example.com -m raw -a "yum -y install python-simplejson"
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
.. _seboolean:
|
||||
|
||||
seboolean
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
Toggles SELinux booleans.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul><li>true</li><li>false</li></ul></td>
|
||||
<td>Desired boolean value</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Name of the boolean to configure</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>persistent</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>Set to 'yes' if the boolean setting should survive a reboot</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Set <em>httpd_can_network_connect</em> SELinux flag to <em>true</em> and <em>persistent</em></p> <p><pre>
|
||||
seboolean name=httpd_can_network_connect state=true persistent=yes
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Not tested on any debian based system</p>
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
.. _selinux:
|
||||
|
||||
selinux
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
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.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>policy</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the SELinux policy to use (example: 'targeted')</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul><li>enforcing</li><li>permissive</li><li>disabled</li></ul></td>
|
||||
<td>The SELinux mode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conf</td>
|
||||
<td>no</td>
|
||||
<td>/etc/selinux/config</td>
|
||||
<td><ul></ul></td>
|
||||
<td>path to the SELinux configuration file, if non-standard</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p><pre>
|
||||
selinux policy=targeted state=enforcing
|
||||
</pre></p>
|
||||
<p><pre>
|
||||
selinux policy=targeted state=disabled
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Not tested on any debian based system</p>
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
.. _service:
|
||||
|
||||
service
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.1
|
||||
|
||||
Controls services on remote hosts.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pattern</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>If the service does not respond to the status command, name a substring to look for as would be found in the output of the <em>ps</em> command as a stand-in for a status result. If the string is found, the service will be assumed to be running. (added in Ansible 0.7)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul><li>running</li><li>started</li><li>stopped</li><li>restarted</li><li>reloaded</li></ul></td>
|
||||
<td><em>started</em>, <em>stopped</em>, <em>reloaded</em>, <em>restarted</em>. <em>Started</em>/<em>stopped</em> are idempotent actions that will not run commands unless necessary. <em>restarted</em> will always bounce the service. <em>reloaded</em> will always reload.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>enabled</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>Whether the service should start on boot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Name of the service.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example action from Ansible Playbooks</p> <p><pre>
|
||||
service name=httpd state=started
|
||||
</pre></p>
|
||||
<p>Example action from Ansible Playbooks</p> <p><pre>
|
||||
service name=httpd state=stopped
|
||||
</pre></p>
|
||||
<p>Example action from Ansible Playbooks</p> <p><pre>
|
||||
service name=httpd state=restarted
|
||||
</pre></p>
|
||||
<p>Example action from Ansible Playbooks</p> <p><pre>
|
||||
service name=httpd state=reloaded
|
||||
</pre></p>
|
||||
<p>Example action from Ansible Playbooks</p> <p><pre>
|
||||
service name=foo pattern=/usr/bin/foo state=started
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
.. _setup:
|
||||
|
||||
setup
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
This module is automatically called by playbooks to gather useful variables about remote hosts that can be used in playbooks. It can also be executed directly by ``/usr/bin/ansible`` to check what variables are available to a host. Ansible provides many *facts* about the system, automatically.
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Obtain facts from all hosts and store them indexed by hostname at /tmp/facts.</p> <p><pre>
|
||||
ansible all -m setup --tree /tmp/facts
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>More ansible facts will be added with successive releases. If <em>facter</em> or <em>ohai</em> are installed, variables from these programs will also be snapshotted into the JSON file for usage in templating. These variables are prefixed with <code>facter_</code> and <code>ohai_</code> so it's easy to tell their source. All variables are bubbled up to the caller. Using the ansible facts and choosing to not install <em>facter</em> and <em>ohai</em> means you can avoid Ruby-dependencies on your remote systems.</p>
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
.. _shell:
|
||||
|
||||
shell
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.2
|
||||
|
||||
The shell module takes the command name followed by a list of arguments, space delimited. It is almost exactly like the ``command`` module but runs the command through a shell (``/bin/sh``) on the remote node.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>creates</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>a filename, when it already exists, this step will NOT be run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>chdir</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>cd into this directory before running the command (0.6 and later)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>(free form)</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The command module takes a free form command to run</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Execute the command in remote shell</p> <p><pre>
|
||||
shell somescript.sh >> somelog.txt
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>If you want to execute a command securely and predicably, it may be better to use the <span class='module'>command</span> module instead. Best practices when writing playbooks will follow the trend of using <span class='module'>command</span> unless <span class='module'>shell</span> is explicitly required. When running ad-hoc commands, use your best judgement.</p>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
.. _slurp:
|
||||
|
||||
slurp
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
This module works like ``fetch``. It is used for fetching a base64- encoded blob containing the data in a remote file.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>src</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The file on the remote system to fetch. This must be a file, not a directory.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example using <code>/usr/bin/ansible</code></p> <p><pre>
|
||||
ansible host -m slurp -a 'src=/tmp/xx'
|
||||
host | success >> {
|
||||
"content": "aGVsbG8gQW5zaWJsZSB3b3JsZAo=",
|
||||
"encoding": "base64"
|
||||
}
|
||||
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>See also: <span class='module'>fetch</span></p>
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
.. _subversion:
|
||||
|
||||
subversion
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
This module is really simple, so for now this checks out from the given branch of a repo at a particular SHA or tag. Latest is not supported, you should not be doing that.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>repo</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The subversion URL to the repository.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Absolute path where the repository should be deployed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>force</td>
|
||||
<td>no</td>
|
||||
<td>True</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></td>
|
||||
<td>If yes, any modified files in the working repository will be discarded. If no, this module will fail if it encounters modified files.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Export subversion repository in a specified folder</p> <p><pre>
|
||||
subversion repo=svn+ssh://an.example.org/path/to/repo dest=/src/checkout
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Requires subversion and grep on the client.</p>
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
.. _supervisorctl:
|
||||
|
||||
supervisorctl
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
Manage the state of a program or group of programs running via Supervisord
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul><li>started</li><li>stopped</li><li>restarted</li></ul></td>
|
||||
<td>The state of service</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>The name of the supervisord program/process to manage</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Manage the state of program <em>my_app</em> to be in <em>started</em> state.</p> <p><pre>
|
||||
supervisorctl name=my_app state=started
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
.. _template:
|
||||
|
||||
template
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
Templates are processed by the Jinja2 templating language (http://jinja.pocoo.org/docs/) - documentation on the template formatting can be found in the Template Designer Documentation (http://jinja.pocoo.org/docs/templates/).
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dest</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Location to render the template to on the remote machine.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>src</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Path of a Jinja2 formatted template on the local server. This can be a relative or absolute path.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>backup</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>yes</li><li>no</li></ul></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>
|
||||
<td>others</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>all arguments accepted by the <span class='module'>file</span> module also work here</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
template src=/mytemplates/foo.j2 dest=/etc/file.conf owner=bin group=wheel mode=0644
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Since Ansible version 0.9, templates are loaded with <code>trim_blocks=True</code>.</p>
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
.. _user:
|
||||
|
||||
user
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.2
|
||||
|
||||
Manage user accounts and user attributes.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>comment</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optionally sets the description (aka <em>GECOS</em>) of user account.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shell</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optionally set the user's shell.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>force</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>True</li><li>False</li></ul></td>
|
||||
<td>When used with <em>state=absent</em>, behavior is as with <em>userdel --force</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Name of the user to create, remove or modify.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>createhome</td>
|
||||
<td>no</td>
|
||||
<td>yes</td>
|
||||
<td><ul><li>True</li><li>False</li></ul></td>
|
||||
<td>Unless set to <em>no</em>, a home directory will be made for the user when the account is created.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>system</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>True</li><li>False</li></ul></td>
|
||||
<td>When creating an account, setting this to <em>yes</em> makes the user a system account. This setting cannot be changed on existing users.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>remove</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>True</li><li>False</li></ul></td>
|
||||
<td>When used with <em>state=absent</em>, behavior is as with <em>userdel --remove</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>absent</li></ul></td>
|
||||
<td>Whether the account should exist. When <em>absent</em>, removes the user account.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>groups</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Puts the user in this comma-delimited list of groups.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>home</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optionally set the user's home directory.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>group</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optionally sets the user's primary group (takes a group name).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optionally set the user's password to this crypted value. See the user example in the github examples directory for what this looks like in a playbook.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>append</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>If <em>yes</em>, will only add groups, not set them to just the list in <em>groups</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>uid</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>Optionally sets the <em>UID</em> of the user.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<br/>
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
.. _virt:
|
||||
|
||||
virt
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.2
|
||||
|
||||
Manages virtual machines supported by *libvirt*.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>no</td>
|
||||
<td><ul><li>running</li><li>shutdown</li><li>destroyed</li><li>undefined</li></ul></td>
|
||||
<td>Note that there may be some lag for state requests like <code>shutdown</code> since these refer only to VM states. After starting a guest, it may not be immediately accessible.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>command</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>in addition to state management, various non-idempotent commands are available. See examples</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>name of the guest VM being managed</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
virt guest=alpha state=running
|
||||
</pre></p>
|
||||
<p>Example guest management with <code>/usr/bin/ansible</code></p> <p><pre>
|
||||
ansible host -m virt -a "guest=alpha command=status"
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<h4>Notes</h4>
|
||||
<p>Other non-idempotent commands are: <code>status</code>, <code>pause</code>, <code>unpause</code>, <code>get_xml</code>, <code>autostart</code>, <code>freemem</code>, <code>list_vms</code>, <code>info</code>, <code>nodeinfo</code>, <code>virttype</code></p>
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
.. _wait_for:
|
||||
|
||||
wait_for
|
||||
``````````````````````````````
|
||||
|
||||
.. versionadded:: 0.7
|
||||
|
||||
This is useful for when services are not immediately available after their init scripts return - which is true of certain Java application servers. It is also useful when starting guests with the ``virt`` module and needing to pause until they are ready.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>delay</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>number of seconds to wait before starting to poll</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>host</td>
|
||||
<td>no</td>
|
||||
<td>127.0.0.1</td>
|
||||
<td><ul></ul></td>
|
||||
<td>hostname or IP address to wait for</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>port</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>port number to poll</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>timeout</td>
|
||||
<td>no</td>
|
||||
<td>300</td>
|
||||
<td><ul></ul></td>
|
||||
<td>maximum number of seconds to wait for</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>started</td>
|
||||
<td><ul><li>started</li><li>stopped</li></ul></td>
|
||||
<td>either <code>started</code>, or <code>stopped</code> depending on whether the module should poll for the port being open or closed.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>Example from Ansible Playbooks</p> <p><pre>
|
||||
wait_for port=8000 delay=10
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
.. _yum:
|
||||
|
||||
yum
|
||||
``````````````````````````````
|
||||
|
||||
|
||||
Will install, upgrade, remove, and list packages with the *yum* package manager.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="head">parameter</th>
|
||||
<th class="head">required</th>
|
||||
<th class="head">default</th>
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>no</td>
|
||||
<td>present</td>
|
||||
<td><ul><li>present</li><li>latest</li><li>absent</li></ul></td>
|
||||
<td>whether to install (<code>present</code>, <code>latest</code>), or remove (<code>absent</code>) a package.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>list</td>
|
||||
<td>no</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>various non-idempotent commands for usage with <code>/usr/bin/ansible</code> and <em>not</em> playbooks. See examples.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>name</td>
|
||||
<td>yes</td>
|
||||
<td></td>
|
||||
<td><ul></ul></td>
|
||||
<td>package name, or package specifier with version, like <code>name-1.0</code>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p><pre>
|
||||
yum name=httpd state=latest
|
||||
</pre></p>
|
||||
<p><pre>
|
||||
yum name=httpd state=removed
|
||||
</pre></p>
|
||||
<p><pre>
|
||||
yum name=httpd state=installed
|
||||
</pre></p>
|
||||
<br/>
|
||||
|
Loading…
Reference in a new issue