rst.j2 1.92 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 39 40
    {% if v.get('type', 'not_bool') == 'bool' %}
    <td><ul><li>yes</li><li>no</li></ul></td>
    {% else %}
41
    <td><ul>{% for choice in v.get('choices',[]) -%}<li>@{ choice }@</li>{% endfor -%}</ul></td>
42
    {% endif %}
43
    <td>{% for desc in v.description -%}@{ desc | html_ify }@{% endfor -%}{% if v['version_added'] %} (added in Ansible @{v['version_added']}@){% endif %}</td>
44 45 46
    </tr>
    {% endfor %}
    </table>
47 48
{% endif %}

49 50 51 52 53 54 55 56 57 58 59 60
{% if requirements %}
.. raw:: html

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

{% endif %}

61 62 63
.. raw:: html

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

73 74 75 76 77 78 79 80
{% if plainexamples %}
.. raw:: html

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

81

82 83 84 85 86 87 88 89
{% if notes %}
.. raw:: html

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