mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Module documentation should have options sorted
This commit is contained in:
@@ -251,7 +251,7 @@ def main():
|
||||
variable_start_string="@{",
|
||||
variable_end_string="}@",
|
||||
trim_blocks=True,
|
||||
)
|
||||
)
|
||||
|
||||
env.globals['xline'] = rst_xline
|
||||
|
||||
@@ -334,6 +334,12 @@ def main():
|
||||
|
||||
if not doc is None:
|
||||
|
||||
all_keys = []
|
||||
for (k,v) in doc['options'].iteritems():
|
||||
all_keys.append(k)
|
||||
all_keys = sorted(all_keys)
|
||||
doc['option_keys'] = all_keys
|
||||
|
||||
doc['filename'] = fname
|
||||
doc['docuri'] = doc['module'].replace('_', '-')
|
||||
doc['now_date'] = datetime.date.today().strftime('%Y-%m-%d')
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<th class="head">choices</th>
|
||||
<th class="head">comments</th>
|
||||
</tr>
|
||||
{% for (k,v) in options.iteritems() %}
|
||||
{% for k in option_keys %}
|
||||
{% set v = options[k] %}
|
||||
<tr>
|
||||
<td>@{ k }@</td>
|
||||
<td>{% if v.get('required', False) %}yes{% else %}no{% endif %}</td>
|
||||
|
||||
Reference in New Issue
Block a user