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

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

44 45 46
.. raw:: html

{% for example in examples %}
47
    {% if example['description'] %}<p>@{ example['description'] | html_ify }@</p>{% endif %}
48
    <p><pre>
49 50
    @{ example['code'] }@
    </pre></p>
51 52 53
{% endfor %}
    <br/>

54 55 56 57 58 59 60 61
{% if notes %}
.. raw:: html

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