|
99 | 99 | :ansible-option-default-bold:`Default:` :ansible-option-default:`@{ value['default'] | antsibull_to_json | rst_escape(escape_ending_whitespace=true) | indent(6, blank=true) }@`
|
100 | 100 | {% endif %}
|
101 | 101 | {# Configuration #}
|
102 |
| -{% if plugin_type != 'module' and plugin_type != 'role' and (value['ini'] or value['env'] or value['vars'] or value['cli']) %} |
| 102 | +{% if plugin_type != 'role' and (value['ini'] or value['env'] or value['vars'] or value['cli']) %} |
103 | 103 |
|
104 | 104 | .. rst-class:: ansible-option-line
|
105 | 105 |
|
106 | 106 | :ansible-option-configuration:`Configuration:`
|
107 | 107 |
|
| 108 | +{% if plugin_type == 'module' and value['env'] %} |
| 109 | + The below environment variable{% if value['env'] | length > 1 %}s{% endif %} will be used on the host that executes this module. |
| 110 | + |
| 111 | +{% endif %} |
108 | 112 | {% if value['ini'] %}
|
109 | 113 | - INI {% if value['ini'] | length == 1 %}entry{% else %}entries{% endif %}:
|
110 | 114 | {% for ini in value['ini'] %}
|
|
132 | 136 | {% endif %}
|
133 | 137 | @{ deprecates_rst(env['deprecated'], collection, 8) }@
|
134 | 138 | {% endfor %}
|
135 |
| -{% for myvar in value['vars'] %} |
| 139 | +{% for myvar in value['vars'] | default([]) %} |
136 | 140 | - Variable: @{ myvar['name'] | rst_escape }@
|
137 | 141 | {% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
|
138 | 142 |
|
139 | 143 | :ansible-option-versionadded:`added in @{ version_added_rst(myvar['version_added'], myvar['version_added_collection'] or collection) }@`
|
140 | 144 | {% endif %}
|
141 | 145 | @{ deprecates_rst(myvar['deprecated'], collection, 8) }@
|
142 | 146 | {% endfor %}
|
143 |
| -{% for kw in value['keyword'] %} |
| 147 | +{% for kw in value['keyword'] | default([]) %} |
144 | 148 | - Keyword: @{ kw['name'] | rst_escape }@
|
145 | 149 | {% if kw['version_added'] is still_relevant(collection=kw['version_added_collection'] or collection) %}
|
146 | 150 |
|
147 | 151 | :ansible-option-versionadded:`added in @{ version_added_rst(kw['version_added'], kw['version_added_collection'] or collection) }@`
|
148 | 152 | {% endif %}
|
149 | 153 | @{ deprecates_rst(kw['deprecated'], collection, 8) }@
|
150 | 154 | {% endfor %}
|
151 |
| -{% for mycli in value['cli'] %} |
| 155 | +{% for mycli in value['cli'] | default([]) %} |
152 | 156 | - CLI argument: @{ mycli['option'] | rst_escape }@
|
153 | 157 | {% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
|
154 | 158 |
|
|
228 | 232 | <p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-value literal notranslate ansible-option-default">@{ value['default'] | antsibull_to_json | escape | indent(6, blank=true) }@</code></p>
|
229 | 233 | {% endif %}
|
230 | 234 | {# Configuration #}
|
231 |
| -{% if plugin_type != 'module' and plugin_type != 'role' and (value['ini'] or value['env'] or value['vars'] or value['cli']) %} |
| 235 | +{% if plugin_type != 'role' and (value['ini'] or value['env'] or value['vars'] or value['cli']) %} |
232 | 236 | <p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
| 237 | + <p>The below environment variable{% if value['env'] | length > 1 %}s{% endif %} will be used on the host that executes this module.</p> |
233 | 238 | <ul class="simple">
|
234 | 239 | {% if value['ini'] %}
|
235 | 240 | <li>
|
|
257 | 262 | @{ deprecates_html(env['deprecated'], collection) }@
|
258 | 263 | </li>
|
259 | 264 | {% endfor %}
|
260 |
| -{% for myvar in value['vars'] %} |
| 265 | +{% for myvar in value['vars'] | default([]) %} |
261 | 266 | <li>
|
262 | 267 | <p>Variable: @{ myvar['name'] | escape }@</p>
|
263 | 268 | {% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
|
|
266 | 271 | @{ deprecates_html(myvar['deprecated'], collection) }@
|
267 | 272 | </li>
|
268 | 273 | {% endfor %}
|
269 |
| -{% for kw in value['keyword'] %} |
| 274 | +{% for kw in value['keyword'] | default([]) %} |
270 | 275 | <li>
|
271 | 276 | <p>Keyword: @{ kw['name'] | escape }@</p>
|
272 | 277 | {% if kw['version_added'] is still_relevant(collection=kw['version_added_collection'] or collection) %}
|
|
275 | 280 | @{ deprecates_html(kw['deprecated'], collection) }@
|
276 | 281 | </li>
|
277 | 282 | {% endfor %}
|
278 |
| -{% for mycli in value['cli'] %} |
| 283 | +{% for mycli in value['cli'] | default([]) %} |
279 | 284 | <li>
|
280 | 285 | <p>CLI argument: @{ mycli['option'] | escape }@</p>
|
281 | 286 | {% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
|
|
0 commit comments