:source: @{ source }@ .. _@{ module }@: {% if short_description %} {% set title = module + ' - ' + short_description|convert_symbols_to_format %} {% else %} {% set title = module %} {% endif %} @{ title }@ @{ '+' * title|length }@ {% if version_added is defined and version_added != '' -%} .. versionadded:: @{ version_added | default('') }@ {% endif %} .. contents:: :local: :depth: 2 {# ------------------------------------------ # # Please note: this looks like a core dump # but it isn't one. # --------------------------------------------#} {% if deprecated is defined -%} DEPRECATED ---------- {# use unknown here? skip the fields? #} :Removed in Ansible: version: @{ deprecated['removed_in'] | default('') | string | convert_symbols_to_format }@ :Why: @{ deprecated['why'] | default('') | convert_symbols_to_format }@ :Alternative: @{ deprecated['alternative'] | default('')| convert_symbols_to_format }@ {% endif %} Synopsis -------- {% if description -%} {% if description is string -%} - @{ description | convert_symbols_to_format }@ {% else %} {% for desc in description %} - @{ desc | convert_symbols_to_format }@ {% endfor %} {% endif %} {% endif %} {% if aliases is defined -%} Aliases: @{ ','.join(aliases) }@ {% endif %} {% if requirements -%} Requirements ~~~~~~~~~~~~ {% if plugin_type == 'module' %} 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 }@. {% endif %} {% for req in requirements %} - @{ req | convert_symbols_to_format }@ {% endfor %} {% endif %} {% if options -%} Parameters ---------- .. raw:: html {# Header of the documentation #} {% if plugin_type != 'module' %} {% endif %} {% for key, value in options|dictsort recursive %} {# parameter name with required and/or introduced label #} {# default / choices #} {# configuration #} {% if plugin_type != 'module' %} {% endif %} {# description #} {% if value.suboptions %} {% if value.suboptions.items %} @{ loop(value.suboptions.items()) }@ {% elif value.suboptions[0].items %} @{ loop(value.suboptions[0].items()) }@ {% endif %} {% endif %} {% endfor %}
Parameter
Choices/Defaults
Configuration
Comments
{% for i in range(1, loop.depth) %}
{% endfor %}
@{ key }@ {% if value.get('required', False) %}
required
{% endif %} {% if value.version_added %}
(added in @{value.version_added}@)
{% endif %}
{% 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 %} {% if value.type == 'bool' %} {% set _x = value.update({'choices': ['no', 'yes']}) %} {% endif %} {% if value.choices %}
    Choices: {% if value.default not in value.choices %}
  • @{ value.default }@ ←
  • {% endif %} {% for choice in value.choices %} {% if value.default is defined and choice == value.default %}
  • @{ value.default }@ ←
  • {% else %}
  • @{ choice }@
  • {% endif %} {% endfor %}
{% elif value.default is defined %}
@{ value.default | html_ify }@
{% endif %}
{% if 'ini' in value %}
ini entries: {% for ini in value.ini %}

[@{ ini.section }@ ]
@{ ini.key }@ = @{ value.default | default('VALUE') }@

{% endfor %}
{% endif %} {% if 'env' in value %} {% for env in value.env %}
env:@{ env.name }@
{% endfor %} {% endif %} {% if 'vars' in value %} {% for myvar in value.vars %}
var: @{ myvar.name }@
{% endfor %} {% endif %}
{% if value.description is string %}
@{ value.description | replace('\n', '\n ') | html_ify }@
{% else %} {% for desc in value.description %}
@{ desc | replace('\n', '\n ') | html_ify }@
{% endfor %} {% endif %} {% if 'aliases' in value and value.aliases %}

aliases: @{ value.aliases|join(', ') }@
{% endif %}

{% endif %} {% if notes -%} Notes ----- .. note:: {% for note in notes %} - @{ note | convert_symbols_to_format }@ {% endfor %} {% endif %} {% if examples or plainexamples -%} Examples -------- .. code-block:: yaml {% for example in examples %} {% if example['description'] %}@{ example['description'] | indent(4, True) }@{% endif %} @{ example['code'] | escape | indent(4, True) }@ {% endfor %} {% if plainexamples %}@{ plainexamples | indent(4, True) }@{% endif %} {% endif %} {% 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 %} {% if returnfacts -%} 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. .. raw:: html {% for key, value in returnfacts|dictsort recursive %} {# --------------------------------------------------------- # 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 %}
Fact
Returned
Description
{% for i in range(1, loop.depth) %}
{% endfor %}
@{ key }@
@{ value.type }@
@{ value.returned }@
{% if value.description is string %}
@{ value.description | html_ify }@
{% else %} {% for desc in value.description %}
@{ desc | html_ify }@
{% endfor %} {% endif %}
{% if value.sample %}
Sample:
{#
@{ value.sample | html_ify }@
#}
@{ value.sample | html_ify }@
{% endif %}


{% endif %} {% if returndocs -%} Return Values ------------- Common return values are documented :ref:`here `, the following are the fields unique to this @{ plugin_type }@: .. raw:: html {% for key, value in returndocs|dictsort recursive %} {# --------------------------------------------------------- # 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 %}
Key
Returned
Description
{% for i in range(1, loop.depth) %}
{% endfor %}
@{ key }@
@{ value.type }@
@{ value.returned }@
{% if value.description is string %}
@{ value.description | html_ify }@
{% else %} {% for desc in value.description %}
@{ desc | html_ify }@
{% endfor %} {% endif %}
{% if value.sample %}
Sample:
{#
@{ value.sample | html_ify }@
#}
@{ value.sample | html_ify }@
{% endif %}


{% endif %} Status ------ {% if not deprecated %} {% 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 %} {% for cur_state in metadata.status %} This module is flagged as **@{cur_state}@** which means that @{module_states[cur_state]}@. {% endfor %} {% endif %} {% if metadata.supported_by in ('core', 'network') %} Support ~~~~~~~ For more information about Red Hat's support of this @{ plugin_type }@, please refer to this `Knowledge Base article `_ {% endif %} {% endif %} {% else %} 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 :ref:`DEPRECATED`. {% endif %} {% if author is defined -%} Author ~~~~~~ {% for author_name in author %} - @{ author_name }@ {% endfor %} {% endif %} .. hint:: If you notice any issues in this documentation you can `edit this document `_ to improve it.