2018-02-24 03:57:37 +01:00
:source: @{ source }@
2012-09-26 20:41:44 +02:00
.. _@{ module }@:
2013-12-26 00:06:55 +01:00
{% if short_description %}
2018-02-25 16:40:27 +01:00
{% set title = module + ' - ' + short_description|convert_symbols_to_format %}
2013-12-26 00:06:55 +01:00
{% else %}
2018-02-25 16:40:27 +01:00
{% set title = module %}
2013-12-26 00:06:55 +01:00
{% endif %}
@{ title }@
2018-02-25 16:40:27 +01:00
@{ '+' * title|length }@
2013-12-26 00:06:55 +01:00
2017-09-19 17:14:27 +02:00
{% if version_added is defined and version_added != '' -%}
.. versionadded:: @{ version_added | default('') }@
2015-07-17 16:00:02 +02:00
{% endif %}
2013-12-25 20:05:43 +01:00
.. contents::
:local:
2017-01-10 18:26:34 +01:00
:depth: 2
2012-09-26 20:41:44 +02:00
{# ------------------------------------------
#
# Please note: this looks like a core dump
# but it isn't one.
#
--------------------------------------------#}
2014-10-30 18:29:54 +01:00
{% if deprecated is defined -%}
2017-09-19 17:14:27 +02:00
2014-10-30 18:29:54 +01:00
DEPRECATED
----------
2017-09-19 17:14:27 +02:00
{# use unknown here? skip the fields? #}
2018-01-30 13:23:52 +01:00
:Removed in Ansible: version: @{ deprecated['removed_in'] | default('') | string | convert_symbols_to_format }@
2017-09-19 17:14:27 +02:00
:Why: @{ deprecated['why'] | default('') | convert_symbols_to_format }@
:Alternative: @{ deprecated['alternative'] | default('')| convert_symbols_to_format }@
2014-10-30 18:29:54 +01:00
{% endif %}
2013-12-25 20:05:43 +01:00
Synopsis
--------
2017-09-19 17:14:27 +02:00
{% if description %}
2018-02-25 16:40:27 +01:00
{% if description is string -%}
2017-11-09 18:45:11 +01:00
* @{ description | convert_symbols_to_format }@
2018-02-25 16:40:27 +01:00
{% else %}
{% for desc in description -%}
2017-09-19 17:14:27 +02:00
* @{ desc | convert_symbols_to_format }@
2018-02-25 16:40:27 +01:00
{% endfor %}
{% endif %}
2017-09-19 17:14:27 +02:00
{% endif %}
2017-11-09 18:45:11 +01:00
2015-07-17 16:00:02 +02:00
{% if aliases is defined -%}
2017-09-19 17:14:27 +02:00
2015-07-17 16:00:02 +02:00
Aliases: @{ ','.join(aliases) }@
2015-06-04 04:19:26 +02:00
2017-09-19 17:14:27 +02:00
{% endif %}
2015-06-04 04:19:26 +02:00
2017-09-19 17:14:27 +02:00
{% if requirements %}
2018-02-28 18:16:18 +01:00
{% set req_title = 'Requirements' %}
2018-02-25 16:40:27 +01:00
{% if plugin_type == 'module' %}
2018-02-28 18:16:18 +01:00
{% set req_title = req_title + ' (on host that executes module)' %}
2018-02-25 16:40:27 +01:00
{% endif %}
2018-02-28 18:16:18 +01:00
@{ req_title }@
@{ '-' * req_title|length }@
2017-10-11 06:15:25 +02:00
2018-02-25 16:40:27 +01:00
{% for req in requirements %}
2018-02-28 18:16:18 +01:00
* @{ req | convert_symbols_to_format }@
2018-02-25 16:40:27 +01:00
{% endfor %}
2017-09-19 17:14:27 +02:00
2015-06-04 04:19:26 +02:00
{% endif %}
2012-09-30 13:20:24 +02:00
{% if options -%}
2017-09-19 17:14:27 +02:00
2013-12-25 20:05:43 +01:00
Options
-------
2012-09-28 03:06:31 +02:00
.. raw:: html
2017-11-22 22:53:53 +01:00
<table border=0 cellpadding=0 class="documentation-table">
{# Header of the documentation #}
2017-08-18 21:38:55 +02:00
<tr>
2018-02-25 16:40:27 +01:00
<th class="head"><div class="cell-border">Parameter</div></th>
<th class="head"><div class="cell-border">Default</div></th>
<th class="head"><div class="cell-border">Choices</div></th>
2017-11-22 22:53:53 +01:00
{% if plugin_type != 'module' %}
2018-02-25 16:40:27 +01:00
<th class="head"><div class="cell-border">Configuration</div></th>
2017-11-22 22:53:53 +01:00
{% endif %}
2018-02-25 16:40:27 +01:00
<th class="head"><div class="cell-border">Comments</div></th>
2017-08-18 21:38:55 +02:00
</tr>
2018-01-24 23:50:05 +01:00
{% for key, value in options|dictsort recursive %}
2017-11-22 22:53:53 +01:00
<tr class="return-value-column">
{# parameter name with introduced label #}
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
<div class="elbow-placeholder">
</div>
{% endfor %}
<div class="elbow-key">
2018-02-28 18:00:56 +01:00
<b>@{ key }@</b>
{% if value.get('required', False) %}<br/><div style="font-size: small; color: red">required</div>{% endif %}
{% if value.version_added %}<br/><div style="font-size: small; color: darkgreen">(added in @{value.version_added}@)</div>{% endif %}
2017-11-22 22:53:53 +01:00
</div>
<div class="outer-elbow-container">
</td>
{# default value #}
2018-02-25 16:40:27 +01:00
<td><div class="cell-border">{% if value.default %}@{ value.default | html_ify }@{% endif %}</div></td>
2017-11-22 22:53:53 +01:00
{# choices #}
<td>
<div class="cell-border">
2017-12-20 10:48:17 +01:00
{% if value.type == 'bool' %}
2017-11-22 22:53:53 +01:00
<ul>
<li>yes</li>
<li>no</li>
</ul>
{% else %}
{% if value.choices %}
<ul>
{% for choice in value.choices %}
<li>@{ choice }@</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
</td>
{# configuration #}
{% if plugin_type != 'module' %}
<td>
<div class="cell-border">
{% if 'ini' in value %}
<div> ini entries:
{% for ini in value.ini %}
<p>[@{ ini.section }@ ]<br>@{ ini.key }@ = @{ value.default | default('VALUE') }@</p>
{% endfor %}
</div>
{% endif %}
{% if 'env' in value %}
{% for env in value.env %}
<div>env:@{ env.name }@</div>
{% endfor %}
{% endif %}
{% if 'vars' in value %}
{% for myvar in value.vars %}
<div>var: @{ myvar.name }@</div>
{% endfor %}
{% endif %}
</div>
</td>
{% endif %}
{# description #}
<td>
<div class="cell-border">
{% if value.description is string %}
<div>@{ value.description | replace('\n', '\n ') | html_ify }@</div>
{% else %}
{% for desc in value.description %}
2017-12-20 11:49:09 +01:00
<div>@{ desc | replace('\n', '\n ') | html_ify }@</div>
2017-11-22 22:53:53 +01:00
{% endfor %}
{% endif %}
{% if 'aliases' in value and value.aliases %}
</br><div style="font-size: small;">aliases: @{ value.aliases|join(', ') }@</div>
{% endif %}
</div>
</td>
</tr>
{% if value.suboptions %}
{% if value.suboptions.items %}
@{ loop(value.suboptions.items()) }@
{% elif value.suboptions[0].items %}
@{ loop(value.suboptions[0].items()) }@
{% endif %}
{% endif %}
{% endfor %}
2012-09-28 03:06:31 +02:00
</table>
2015-07-17 16:00:02 +02:00
</br>
2015-06-04 04:19:26 +02:00
2018-02-28 17:58:49 +01:00
{% endif %}
{% if notes -%}
Notes
-----
.. note::
{% for note in notes %}
- @{ note | convert_symbols_to_format }@
{% endfor %}
2012-09-26 20:41:44 +02:00
{% endif %}
2017-09-19 17:14:27 +02:00
{% if examples or plainexamples -%}
2012-09-26 20:41:44 +02:00
2013-05-11 16:31:47 +02:00
2013-12-25 20:05:43 +01:00
Examples
--------
2017-10-11 06:15:25 +02:00
.. code-block:: yaml
2012-09-28 03:30:32 +02:00
2018-02-25 16:40:27 +01:00
{% for example in examples %}
{% if example['description'] %}@{ example['description'] | indent(4, True) }@{% endif %}
2012-12-11 17:33:26 +01:00
@{ example['code'] | escape | indent(4, True) }@
2018-02-25 16:40:27 +01:00
{% endfor %}
{% if plainexamples %}@{ plainexamples | indent(4, True) }@{% endif %}
2013-12-25 20:05:43 +01:00
{% endif %}
2013-05-11 16:31:47 +02:00
2015-03-13 16:43:02 +01:00
2015-06-04 04:19:26 +02:00
{% if returndocs -%}
2017-09-19 17:14:27 +02:00
2015-03-13 16:43:02 +01:00
Return Values
-------------
2018-02-24 14:06:12 +01:00
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this @{ plugin_type }@:
2015-03-13 16:43:02 +01:00
.. raw:: html
2015-03-13 17:17:15 +01:00
2017-11-22 22:53:53 +01:00
<table border=0 cellpadding=0 class="documentation-table">
2015-03-20 21:54:22 +01:00
<tr>
2018-02-25 16:40:27 +01:00
<th class="head"><div class="cell-border">Name</div></th>
<th class="head"><div class="cell-border">Description</div></th>
<th class="head"><div class="cell-border">Returned</div></th>
<th class="head"><div class="cell-border">Type</div></th>
<th class="head"><div class="cell-border">Sample</div></th>
2015-03-20 21:54:22 +01:00
</tr>
2018-01-24 23:50:05 +01:00
{% for key, value in returndocs|dictsort recursive %}
2017-11-22 22:53:53 +01:00
<tr class="return-value-column">
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
<div class="elbow-placeholder">
</div>
{% endfor %}
<div class="elbow-key">
2018-02-25 16:40:27 +01:00
<b>@{ key }@</b>
2017-11-22 22:53:53 +01:00
</div>
</div>
</td>
<td>
{% if value.description is string %}
<div class="cell-border">@{ value.description | replace('\n', '\n ') | html_ify }@</div>
{% else %}
{% for desc in value.description %}
<div class="cell-border">@{ desc | replace('\n', '\n ') | html_ify }@</div>
{% endfor %}
{% endif %}
</td>
2018-02-25 16:40:27 +01:00
<td><div class="cell-border">@{ value.returned }@</div></td>
<td><div class="cell-border">@{ value.type }@</div></td>
<td><div class="cell-border">@{ value.sample | replace('\n', '\n ') | html_ify }@</div></td>
2017-11-22 22:53:53 +01:00
</tr>
{# ---------------------------------------------------------
# sadly we cannot blindly iterate through the child dicts,
# since in some documentations,
# lists are used instead of dicts. This handles both types
# ---------------------------------------------------------#}
{% if value.contains %}
{% if value.contains.items %}
@{ loop(value.contains.items()) }@
{% elif value.contains[0].items %}
@{ loop(value.contains[0].items()) }@
{% endif %}
{% endif %}
{% endfor %}
2015-03-20 21:54:22 +01:00
</table>
2017-10-11 06:15:25 +02:00
</br></br>
2015-03-13 16:43:02 +01:00
{% endif %}
2017-09-19 17:14:27 +02:00
{% if author is defined -%}
Author
~~~~~~
2018-02-25 16:40:27 +01:00
{% for author_name in author %}
2018-02-24 14:06:12 +01:00
* @{ author_name }@
2018-02-25 16:40:27 +01:00
{% endfor %}
2012-09-28 03:30:32 +02:00
2017-09-19 17:14:27 +02:00
{% endif %}
2014-10-31 19:18:18 +01:00
{% if not deprecated %}
2018-02-25 16:40:27 +01:00
{% set support = { 'core': 'The Ansible Core Team', 'network': 'The Ansible Network Team', 'certified': 'an Ansible Partner', 'community': 'The Ansible Community', 'curated': 'A Third Party'} %}
{% set module_states = { 'preview': 'it is not guaranteed to have a backwards compatible interface', 'stableinterface': 'the maintainers for this module guarantee that no backward incompatible interface changes will be made'} %}
{% if metadata %}
{% if metadata.status %}
2014-09-27 00:23:57 +02:00
2017-09-19 17:14:27 +02:00
2016-12-22 18:26:28 +01:00
Status
~~~~~~
2014-09-27 00:23:57 +02:00
2018-02-28 18:21:24 +01:00
{% for cur_state in metadata.status %}
2016-12-22 18:26:28 +01:00
This module is flagged as **@{cur_state}@** which means that @{module_states[cur_state]}@.
2018-02-28 18:21:24 +01:00
{% endfor %}
2017-09-19 17:14:27 +02:00
2018-02-25 16:40:27 +01:00
{% endif %}
{% if metadata.supported_by in ('core', 'network') %}
2014-09-27 00:23:57 +02:00
2017-09-19 17:14:27 +02:00
2017-08-16 16:05:14 +02:00
Maintenance Info
~~~~~~~~~~~~~~~~
2014-09-27 00:23:57 +02:00
2017-10-28 06:39:23 +02:00
For more information about Red Hat's support of this @{ plugin_type }@,
2018-01-04 05:52:14 +01:00
please refer to this `Knowledge Base article <https://access.redhat.com/articles/rhel-top-support-policies/>`_
2014-09-26 23:52:50 +02:00
2018-02-25 16:40:27 +01:00
{% endif %}
{% endif %}
2016-12-22 18:26:28 +01:00
{% endif %}
2014-09-26 23:52:50 +02:00
2018-03-01 03:07:03 +01:00
If you notice any issues in this documentation you can `edit this document <https://github.com/ansible/ansible/edit/devel/lib/ansible/modules/@{ source }@?description=%3C!---%20Your%20description%20here%20--%3E%0A%0A+label:%20docsite_pr>`_ to improve it.