rst.j2 1.8 KB
Newer Older
1 2 3
.. _@{ module }@:

@{ module }@
4
++++++++++++++++++++++++++++++++++++++
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

{# ------------------------------------------
 #
 # Please note: this looks like a core dump
 # but it isn't one.
 #
 --------------------------------------------#}

{% if version_added is defined -%}
.. versionadded:: @{ version_added }@
{% endif %}

{% for desc in description -%}
@{ desc | jpfunc }@ 
{% endfor %}

21
{% if options -%}
22 23 24 25
.. raw:: html

    <table>
    <tr>
Jan-Piet Mens committed
26 27 28 29 30
    <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>
31
    </tr>
32 33
    {% for k in option_keys %}
    {% set v = options[k] %}
34 35
    <tr>
    <td>@{ k }@</td>
36
    <td>{% if v.get('required', False) %}yes{% else %}no{% endif %}</td>
37
    <td>{% if v['default'] %}@{ v['default'] }@{% endif %}</td>
38
    <td><ul>{% for choice in v.get('choices',[]) -%}<li>@{ choice }@</li>{% endfor -%}</ul></td>
39
    <td>{% for desc in v.description -%}@{ desc | html_ify }@{% endfor -%}{% if v['version_added'] %} (added in Ansible @{v['version_added']}@){% endif %}</td>
40 41 42
    </tr>
    {% endfor %}
    </table>
43 44
{% endif %}

45 46 47 48 49 50 51 52 53 54 55 56
{% if requirements %}
.. raw:: html

    <p>
    <b>Requirements:</b> 
    {% for req in requirements %}
    @{ req | html_ify }@
    {% endfor %}
    </p>

{% endif %}

57 58 59
.. raw:: html

{% for example in examples %}
60
    {% if example['description'] %}<p>@{ example['description'] | html_ify }@</p>{% endif %}
61 62
    <p>
    <pre>
63
@{ example['code'] | escape | indent(4, True) }@
64 65
    </pre>
    </p>
66 67 68
{% endfor %}
    <br/>

69 70 71 72 73 74 75 76
{% if plainexamples %}
.. raw:: html

    <pre>
@{ plainexamples | escape | indent(4, True) }@
    </pre>
{% endif %}

77

78 79 80 81 82 83 84 85
{% if notes %}
.. raw:: html

    <h4>Notes</h4>
    {% for note in notes %}
    <p>@{ note | html_ify }@</p>
    {% endfor %}
{% endif %}
86