mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
module_formatter fixes
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
%--- @{ module | upper }@ ---- from @{ filename }@ ---
|
||||
|
||||
%: -- module header
|
||||
\mods{@{module}@}{@{docuri}@}{
|
||||
{% for desc in description -%}
|
||||
@{ desc | jpfunc }@
|
||||
{% endfor -%}
|
||||
{% if version_added is defined -%}
|
||||
(\I{* new in version @{ version_added }@})
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
%: -- module options
|
||||
|
||||
{% if options is defined -%}
|
||||
\begin{xlist}{abcdefghijklmno}
|
||||
{% for o in options -%}
|
||||
{% for opt, v in o.iteritems() -%}
|
||||
|
||||
{% if v['required'] -%}
|
||||
\item[\man\,\C{@{ opt }@}]
|
||||
{% else -%}
|
||||
\item[\opt\,\C{@{ opt }@}]
|
||||
{% endif -%}
|
||||
|
||||
{# -------- option description ----------#}
|
||||
{% for desc in v.description -%}
|
||||
@{ desc | jpfunc }@
|
||||
{% endfor %}
|
||||
{% if v['choices'] -%}
|
||||
\B{Choices}:\,
|
||||
{% for choice in v['choices'] -%}\C{@{ choice }@}{% if not loop.last %},{% else %}.{% endif %}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
{% if v['default'] -%}
|
||||
(default \C{@{ v['default'] }@})
|
||||
{% endif -%}
|
||||
{% if v['version_added'] is defined -%}
|
||||
(\I{* version @{ v['version_added'] }@})
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
\end{xlist}
|
||||
{% endif -%}
|
||||
|
||||
{% if notes is defined -%}
|
||||
{# -------- notes ----------#}
|
||||
{% for note in notes -%}
|
||||
\I{@{ note | jpfunc }@}
|
||||
{% endfor %}
|
||||
{% endif -%}
|
||||
|
||||
{#-------------------------------------------
|
||||
|
||||
{% if examples is defined -%}
|
||||
{% for e in examples -%}
|
||||
\begin{extymeta}
|
||||
@{ e['code'] }@
|
||||
\end{extymeta}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
----------------------------------- #}
|
||||
|
||||
{% if extradata is defined -%}
|
||||
%--- BEGIN-EXTRADATA
|
||||
\begin{extymeta}
|
||||
@{ extradata -}@
|
||||
\end{extymeta}
|
||||
%----- END-EXTRADATA
|
||||
{% endif -%}
|
||||
@@ -13,24 +13,19 @@
|
||||
."
|
||||
{% if options is defined -%}
|
||||
.SH OPTIONS
|
||||
{% for o in options -%}{% for opt, v in o.iteritems() -%}
|
||||
.IP @{opt}@
|
||||
{% for desc in v.description -%}
|
||||
@{ desc | jpfunc }@
|
||||
{% endfor -%}
|
||||
{% if v['required'] %}(required){% endif -%}
|
||||
{% if v['choices'] -%}
|
||||
." .SS Choices
|
||||
{% for (k,v) in options.iteritems() %}
|
||||
.IP @{ k }@
|
||||
{% for desc in v.description -%}@{ desc | jpfunc }@{% endfor -%}
|
||||
{% if v.get('choices') %}
|
||||
.IR Choices :
|
||||
{% for choice in v['choices'] -%}@{ choice }@{% if not loop.last %},{% else %}.{% endif -%}
|
||||
{% endfor -%}
|
||||
{% endif %}
|
||||
{% for choice in v.get('choices',[]) -%}@{ choice }@{% if not loop.last %},{%else%}.{%endif-%}{% endfor -%}{% endif %}
|
||||
{% if v.get('required') %}(required){% endif -%}
|
||||
{% if v.get('default') %} (default: @{ v.get('default') }@){% endif -%}
|
||||
{#---------------------------------------------- #}
|
||||
{% if v['version_added'] is defined -%}
|
||||
(Added in Ansible version @{ v['version_added'] }@.)
|
||||
{% if v.get('version_added') -%}
|
||||
(Added in Ansible version @{ v.get('version_added') }@.)
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% endfor -%}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
."
|
||||
."
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _@{ module }@:
|
||||
|
||||
@{ module }@
|
||||
````````
|
||||
``````````````````````````````
|
||||
|
||||
{# ------------------------------------------
|
||||
#
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>parameter</td>
|
||||
<td>required</td>
|
||||
<td>default</td>
|
||||
<td>choices</td>
|
||||
<td>comments</td>
|
||||
<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>
|
||||
</tr>
|
||||
{% for (k,v) in options.iteritems() %}
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user