2018-03-05 14:40:14 +00:00
:source: @{ source }@
2018-04-18 01:45:07 +00:00
.. _@{ module }@_@{ plugin_type }@:
2018-03-15 17:29:03 +00:00
{% for alias in aliases %}
.. _@{ alias }@:
{% endfor %}
2012-09-26 18:41:44 +00:00
2013-12-25 23:06:55 +00:00
{% if short_description %}
2018-03-05 14:40:14 +00:00
{% set title = module + ' - ' + short_description|convert_symbols_to_format %}
2013-12-25 23:06:55 +00:00
{% else %}
2018-03-05 14:40:14 +00:00
{% set title = module %}
2013-12-25 23:06:55 +00:00
{% endif %}
@{ title }@
2018-03-05 14:40:14 +00:00
@{ '+' * title|length }@
2013-12-25 23:06:55 +00:00
2017-09-19 15:14:27 +00:00
{% if version_added is defined and version_added != '' -%}
.. versionadded:: @{ version_added | default('') }@
2015-07-17 14:00:02 +00:00
{% endif %}
2013-12-25 19:05:43 +00:00
.. contents::
:local:
2017-01-10 17:26:34 +00:00
:depth: 2
2012-09-26 18:41:44 +00:00
{# ------------------------------------------
#
# Please note: this looks like a core dump
# but it isn't one.
#
--------------------------------------------#}
2014-10-30 17:29:54 +00:00
{% if deprecated is defined -%}
2017-09-19 15:14:27 +00:00
2014-10-30 17:29:54 +00:00
DEPRECATED
----------
2017-09-19 15:14:27 +00:00
{# use unknown here? skip the fields? #}
2018-01-30 12:23:52 +00:00
:Removed in Ansible: version: @{ deprecated['removed_in'] | default('') | string | convert_symbols_to_format }@
2017-09-19 15:14:27 +00:00
:Why: @{ deprecated['why'] | default('') | convert_symbols_to_format }@
:Alternative: @{ deprecated['alternative'] | default('')| convert_symbols_to_format }@
2014-10-30 17:29:54 +00:00
{% endif %}
2013-12-25 19:05:43 +00:00
Synopsis
--------
2018-03-08 20:04:16 +00:00
{% if description -%}
2017-09-19 15:14:27 +00:00
2018-03-05 14:40:14 +00:00
{% if description is string -%}
2018-03-08 20:04:16 +00:00
- @{ description | convert_symbols_to_format }@
2018-03-05 14:40:14 +00:00
{% else %}
2018-03-08 20:04:16 +00:00
{% for desc in description %}
- @{ desc | convert_symbols_to_format }@
2018-03-05 14:40:14 +00:00
{% endfor %}
{% endif %}
2017-09-19 15:14:27 +00:00
{% endif %}
2017-11-09 17:45:11 +00:00
2015-07-17 14:00:02 +00:00
{% if aliases is defined -%}
Aliases: @{ ','.join(aliases) }@
2017-09-19 15:14:27 +00:00
{% endif %}
2015-06-04 02:19:26 +00:00
2018-03-08 20:04:16 +00:00
{% if requirements -%}
Requirements
~~~~~~~~~~~~
2018-03-05 14:40:14 +00:00
{% if plugin_type == 'module' %}
2018-03-08 20:04:16 +00:00
The below requirements are needed on the host that executes this @{ plugin_type }@.
{% else %}
The below requirements are needed on the local master node that executes this @{ plugin_type }@.
2018-03-05 14:40:14 +00:00
{% endif %}
2017-10-11 04:15:25 +00:00
2018-03-05 14:40:14 +00:00
{% for req in requirements %}
2018-03-08 20:04:16 +00:00
- @{ req | convert_symbols_to_format }@
2018-03-05 14:40:14 +00:00
{% endfor %}
2017-09-19 15:14:27 +00:00
2015-06-04 02:19:26 +00:00
{% endif %}
2012-09-30 11:20:24 +00:00
{% if options -%}
2017-09-19 15:14:27 +00:00
2018-03-08 20:04:16 +00:00
Parameters
----------
2013-12-25 19:05:43 +00:00
2012-09-28 01:06:31 +00:00
.. raw:: html
2017-11-22 21:53:53 +00:00
<table border=0 cellpadding=0 class="documentation-table">
{# Header of the documentation #}
2017-08-18 19:38:55 +00:00
<tr>
2018-03-05 14:40:14 +00:00
<th class="head"><div class="cell-border">Parameter</div></th>
2018-03-08 20:04:16 +00:00
<th class="head"><div class="cell-border">Choices/<font color="blue">Defaults</font></div></th>
2017-11-22 21:53:53 +00:00
{% if plugin_type != 'module' %}
2018-03-05 14:40:14 +00:00
<th class="head"><div class="cell-border">Configuration</div></th>
2017-11-22 21:53:53 +00:00
{% endif %}
2018-03-08 20:04:16 +00:00
<th class="head" width="100%"><div class="cell-border">Comments</div></th>
2017-08-18 19:38:55 +00:00
</tr>
2018-01-24 22:50:05 +00:00
{% for key, value in options|dictsort recursive %}
2017-11-22 21:53:53 +00:00
<tr class="return-value-column">
2018-03-08 20:04:16 +00:00
{# parameter name with required and/or introduced label #}
2017-11-22 21:53:53 +00:00
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
2018-03-22 21:33:51 +00:00
<div class="elbow-placeholder"> </div>
2017-11-22 21:53:53 +00:00
{% endfor %}
<div class="elbow-key">
2018-03-05 14:40:14 +00: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 21:53:53 +00:00
</div>
2018-03-08 20:04:16 +00:00
</div>
2017-11-22 21:53:53 +00:00
</td>
2018-03-08 20:04:16 +00:00
{# default / choices #}
2017-11-22 21:53:53 +00:00
<td>
<div class="cell-border">
2018-03-23 12:04:13 +00:00
{# Turn boolean values in 'yes' and 'no' values #}
2018-03-08 20:04:16 +00:00
{% if value.default is defined %}
{% if value.default == true %}
{% set _x = value.update({'default': 'yes'}) %}
{% elif value.default == false %}
{% set _x = value.update({'default': 'no'}) %}
{% endif %}
{% endif %}
2017-12-20 09:48:17 +00:00
{% if value.type == 'bool' %}
2018-03-08 20:04:16 +00:00
{% set _x = value.update({'choices': ['no', 'yes']}) %}
{% endif %}
2018-03-12 20:50:52 +00:00
{# Show possible choices and highlight details #}
2018-03-08 20:04:16 +00:00
{% if value.choices %}
2018-03-12 20:50:52 +00:00
<ul><b>Choices:</b>
2018-03-08 20:04:16 +00:00
{% for choice in value.choices %}
2018-03-23 12:04:13 +00:00
{# Turn boolean values in 'yes' and 'no' values #}
{% if choice == true %}
{% set choice = 'yes' %}
{% elif choice == false %}
{% set choice = 'no' %}
{% endif %}
{% if (value.default is string and value.default == choice) or (value.default is iterable and value.default is not string and choice in value.default) %}
<li><div style="color: blue"><b>@{ choice | escape }@</b> ←</div></li>
2018-03-08 20:04:16 +00:00
{% else %}
2018-03-23 12:04:13 +00:00
<li>@{ choice | escape }@</li>
2018-03-08 20:04:16 +00:00
{% endif %}
{% endfor %}
</ul>
2018-03-12 20:50:52 +00:00
{% endif %}
{# Show default value, when multiple choice or no choices #}
{% if value.default is defined and value.default not in value.choices %}
<b>Default:</b><br/><div style="color: blue">@{ value.default | escape }@</div>
2017-11-22 21:53:53 +00:00
{% 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 10:49:09 +00:00
<div>@{ desc | replace('\n', '\n ') | html_ify }@</div>
2017-11-22 21:53:53 +00:00
{% endfor %}
{% endif %}
{% if 'aliases' in value and value.aliases %}
2018-03-08 20:04:16 +00:00
<div style="font-size: small; color: darkgreen"><br/>aliases: @{ value.aliases|join(', ') }@</div>
2017-11-22 21:53:53 +00:00
{% 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 01:06:31 +00:00
</table>
2018-03-08 20:04:16 +00:00
<br/>
2015-06-04 02:19:26 +00:00
2018-03-05 14:40:14 +00:00
{% endif %}
2018-03-08 20:04:16 +00:00
{% if notes -%}
2018-03-05 14:40:14 +00:00
Notes
-----
.. note::
{% for note in notes %}
- @{ note | convert_symbols_to_format }@
{% endfor %}
2012-09-26 18:41:44 +00:00
{% endif %}
2018-03-08 20:04:16 +00:00
{% if examples or plainexamples -%}
2013-05-11 14:31:47 +00:00
2013-12-25 19:05:43 +00:00
Examples
--------
2017-10-11 04:15:25 +00:00
.. code-block:: yaml
2012-09-28 01:30:32 +00:00
2018-03-05 14:40:14 +00:00
{% for example in examples %}
{% if example['description'] %}@{ example['description'] | indent(4, True) }@{% endif %}
2012-12-11 16:33:26 +00:00
@{ example['code'] | escape | indent(4, True) }@
2018-03-05 14:40:14 +00:00
{% endfor %}
{% if plainexamples %}@{ plainexamples | indent(4, True) }@{% endif %}
2013-05-11 14:31:47 +00:00
2018-03-08 20:04:16 +00:00
{% endif %}
2015-03-13 15:43:02 +00:00
2018-03-08 20:04:16 +00:00
{% if not returnfacts and returndocs and returndocs.ansible_facts is defined %}
{% set returnfacts = returndocs.ansible_facts.contains %}
{% set _x = returndocs.pop('ansible_facts', None) %}
{% endif %}
2017-09-19 15:14:27 +00:00
2018-03-08 20:04:16 +00:00
{% if returnfacts -%}
2015-03-13 15:43:02 +00:00
2018-03-08 20:04:16 +00:00
Returned Facts
--------------
Facts returned by this module are added/updated in the ``hostvars`` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
2015-03-13 15:43:02 +00:00
.. raw:: html
2015-03-13 16:17:15 +00:00
2017-11-22 21:53:53 +00:00
<table border=0 cellpadding=0 class="documentation-table">
2015-03-20 20:54:22 +00:00
<tr>
2018-03-08 20:04:16 +00:00
<th class="head"><div class="cell-border">Fact</div></th>
2018-03-05 14:40:14 +00:00
<th class="head"><div class="cell-border">Returned</div></th>
2018-03-08 20:04:16 +00:00
<th class="head" width="100%"><div class="cell-border">Description</div></th>
2015-03-20 20:54:22 +00:00
</tr>
2018-03-08 20:04:16 +00:00
{% for key, value in returnfacts|dictsort recursive %}
2017-11-22 21:53:53 +00:00
<tr class="return-value-column">
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
2018-03-22 21:33:51 +00:00
<div class="elbow-placeholder"> </div>
2017-11-22 21:53:53 +00:00
{% endfor %}
<div class="elbow-key">
2018-03-05 14:40:14 +00:00
<b>@{ key }@</b>
2018-03-08 20:04:16 +00:00
<br/><div style="font-size: small; color: red">@{ value.type }@</div>
2017-11-22 21:53:53 +00:00
</div>
</div>
</td>
2018-03-12 20:50:52 +00:00
<td><div class="cell-border">@{ value.returned | html_ify }@</div></td>
2017-11-22 21:53:53 +00:00
<td>
2018-03-08 20:04:16 +00:00
<div class="cell-border">
{% if value.description is string %}
2018-04-18 20:04:47 +00:00
<div>@{ value.description | html_ify }@
</div>
2018-03-08 20:04:16 +00:00
{% else %}
{% for desc in value.description %}
2018-04-18 20:04:47 +00:00
<div>@{ desc | html_ify }@
</div>
2018-03-08 20:04:16 +00:00
{% endfor %}
{% endif %}
<br/>
2018-03-12 20:50:52 +00:00
{% if value.sample is defined and value.sample %}
2018-03-08 20:04:16 +00:00
<div style="font-size: smaller"><b>Sample:</b></div>
2018-03-12 20:50:52 +00:00
{# TODO: The sample should be escaped, using | escape or | htmlify, but both mess things up beyond repair with dicts #}
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">@{ value.sample | replace('\n', '\n ') | html_ify }@</div>
2018-03-08 20:04:16 +00:00
{% endif %}
</div>
2017-11-22 21:53:53 +00:00
</td>
</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 20:54:22 +00:00
</table>
2018-03-08 20:04:16 +00:00
<br/><br/>
2015-03-13 15:43:02 +00:00
2018-03-08 20:04:16 +00:00
{% endif %}
2017-09-19 15:14:27 +00:00
2018-03-08 20:04:16 +00:00
{% if returndocs -%}
2017-09-19 15:14:27 +00:00
2018-03-08 20:04:16 +00:00
Return Values
-------------
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this @{ plugin_type }@:
2017-09-19 15:14:27 +00:00
2018-03-08 20:04:16 +00:00
.. raw:: html
2012-09-28 01:30:32 +00:00
2018-03-08 20:04:16 +00:00
<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th class="head"><div class="cell-border">Key</div></th>
<th class="head"><div class="cell-border">Returned</div></th>
<th class="head" width="100%"><div class="cell-border">Description</div></th>
</tr>
{% for key, value in returndocs|dictsort recursive %}
<tr class="return-value-column">
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
2018-03-22 21:33:51 +00:00
<div class="elbow-placeholder"> </div>
2018-03-08 20:04:16 +00:00
{% endfor %}
<div class="elbow-key">
<b>@{ key }@</b>
<br/><div style="font-size: small; color: red">@{ value.type }@</div>
</div>
</div>
</td>
2018-03-12 20:50:52 +00:00
<td><div class="cell-border">@{ value.returned | html_ify }@</div></td>
2018-03-08 20:04:16 +00:00
<td>
<div class="cell-border">
{% if value.description is string %}
2018-04-18 21:30:30 +00:00
<div>@{ value.description | html_ify |indent(4)}@</div>
2018-03-08 20:04:16 +00:00
{% else %}
{% for desc in value.description %}
2018-04-18 21:30:30 +00:00
<div>@{ desc | html_ify |indent(4)}@</div>
2018-03-08 20:04:16 +00:00
{% endfor %}
{% endif %}
<br/>
2018-03-23 12:04:13 +00:00
{% if value.sample is defined and value.sample %}
2018-03-08 20:04:16 +00:00
<div style="font-size: smaller"><b>Sample:</b></div>
2018-03-23 12:04:13 +00:00
{# TODO: The sample should be escaped, using |escape or |htmlify, but both mess things up beyond repair with dicts #}
2018-03-12 20:50:52 +00:00
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">@{ value.sample | replace('\n', '\n ') | html_ify }@</div>
2018-03-08 20:04:16 +00:00
{% endif %}
</div>
</td>
</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 %}
</table>
<br/><br/>
2017-09-19 15:14:27 +00:00
{% endif %}
2018-03-08 20:04:16 +00:00
Status
------
2014-10-31 18:18:18 +00:00
{% if not deprecated %}
2018-03-08 20:04:16 +00:00
2018-03-05 14:40:14 +00: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'} %}
2018-03-08 20:04:16 +00:00
2018-03-05 14:40:14 +00:00
{% if metadata %}
{% if metadata.status %}
2014-09-26 22:23:57 +00:00
2018-03-05 14:40:14 +00:00
{% for cur_state in metadata.status %}
2016-12-22 17:26:28 +00:00
This module is flagged as **@{cur_state}@** which means that @{module_states[cur_state]}@.
2018-03-05 14:40:14 +00:00
{% endfor %}
2017-09-19 15:14:27 +00:00
2018-03-05 14:40:14 +00:00
{% endif %}
2014-09-26 22:23:57 +00:00
2018-03-08 20:04:16 +00:00
{% if metadata.supported_by in ('core', 'network') %}
2017-09-19 15:14:27 +00:00
2018-03-08 20:04:16 +00:00
Support
~~~~~~~
2017-10-28 04:39:23 +00:00
For more information about Red Hat's support of this @{ plugin_type }@,
2018-01-04 04:52:14 +00:00
please refer to this `Knowledge Base article <https://access.redhat.com/articles/rhel-top-support-policies/>`_
2014-09-26 21:52:50 +00:00
2018-03-05 14:40:14 +00:00
{% endif %}
{% endif %}
2018-03-08 20:04:16 +00:00
{% else %}
2018-04-13 00:24:14 +00:00
This module is flagged as **deprecated** and will be removed in version @{ deprecated['removed_in'] | default('') | string | convert_symbols_to_format }@. For more information see `DEPRECATED`_.
2018-03-08 20:04:16 +00:00
{% endif %}
{% if author is defined -%}
Author
~~~~~~
{% for author_name in author %}
- @{ author_name }@
{% endfor %}
2016-12-22 17:26:28 +00:00
{% endif %}
2014-09-26 21:52:50 +00:00
2018-03-08 20:04:16 +00:00
.. hint::
2018-04-16 13:29:49 +00:00
{% if plugin_type == 'module' %}
2018-04-05 18:20:03 +00: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%2Blabel:%20docsite_pr>`_ to improve it.
2018-04-16 13:29:49 +00:00
{% else %}
If you notice any issues in this documentation you can `edit this document <https://github.com/ansible/ansible/edit/devel/lib/ansible/plugins/@{ plugin_type }@/@{ source }@_` to improve it.
{% endif %}