Skip to content

Plugin docs: add note on precedence #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@
{% endif %}
@{ deprecates_rst(env['deprecated'], collection, 8, role_entrypoint=role_entrypoint) }@
{% endfor %}
{% for myvar in value['vars'] %}
- Variable: @{ myvar['name'] | rst_escape }@
{% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
{% for mycli in value['cli'] %}
- CLI argument: @{ mycli['option'] | rst_escape }@
{% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}

:ansible-option-versionadded:`added in @{ version_added_rst(myvar['version_added'], myvar['version_added_collection'] or collection) }@`
:ansible-option-versionadded:`added in @{ version_added_rst(mycli['version_added'], mycli['version_added_collection'] or collection) }@`
{% endif %}
@{ deprecates_rst(myvar['deprecated'], collection, 8, role_entrypoint=role_entrypoint) }@
@{ deprecates_rst(mycli['deprecated'], collection, 8, role_entrypoint=role_entrypoint) }@
{% endfor %}
{% for kw in value['keyword'] %}
- Keyword: @{ kw['name'] | rst_escape }@
Expand All @@ -159,13 +159,13 @@
{% endif %}
@{ deprecates_rst(kw['deprecated'], collection, 8, role_entrypoint=role_entrypoint) }@
{% endfor %}
{% for mycli in value['cli'] %}
- CLI argument: @{ mycli['option'] | rst_escape }@
{% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
{% for myvar in value['vars'] %}
- Variable: @{ myvar['name'] | rst_escape }@
{% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}

:ansible-option-versionadded:`added in @{ version_added_rst(mycli['version_added'], mycli['version_added_collection'] or collection) }@`
:ansible-option-versionadded:`added in @{ version_added_rst(myvar['version_added'], myvar['version_added_collection'] or collection) }@`
{% endif %}
@{ deprecates_rst(mycli['deprecated'], collection, 8, role_entrypoint=role_entrypoint) }@
@{ deprecates_rst(myvar['deprecated'], collection, 8, role_entrypoint=role_entrypoint) }@
{% endfor %}
{% endif %}

Expand Down Expand Up @@ -268,13 +268,13 @@
@{ deprecates_html(env['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
{% for myvar in value['vars'] %}
{% for mycli in value['cli'] %}
<li>
<p>Variable: @{ myvar['name'] | escape }@</p>
{% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
<p><em class="ansible-option-versionadded">added in @{ version_added_html(myvar['version_added'], myvar['version_added_collection'] or collection) }@</em></p>
<p>CLI argument: @{ mycli['option'] | escape }@</p>
{% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
<p><em class="ansible-option-versionadded">added in @{ version_added_html(mycli['version_added'], mycli['version_added_collection'] or collection) }@</em></p>
{% endif %}
@{ deprecates_html(myvar['deprecated'], collection, role_entrypoint=role_entrypoint) }@
@{ deprecates_html(mycli['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
{% for kw in value['keyword'] %}
Expand All @@ -286,13 +286,13 @@
@{ deprecates_html(kw['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
{% for mycli in value['cli'] %}
{% for myvar in value['vars'] %}
<li>
<p>CLI argument: @{ mycli['option'] | escape }@</p>
{% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
<p><em class="ansible-option-versionadded">added in @{ version_added_html(mycli['version_added'], mycli['version_added_collection'] or collection) }@</em></p>
<p>Variable: @{ myvar['name'] | escape }@</p>
{% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
<p><em class="ansible-option-versionadded">added in @{ version_added_html(myvar['version_added'], myvar['version_added_collection'] or collection) }@</em></p>
{% endif %}
@{ deprecates_html(mycli['deprecated'], collection, role_entrypoint=role_entrypoint) }@
@{ deprecates_html(myvar['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
</ul>
Expand Down
9 changes: 9 additions & 0 deletions src/antsibull_docs/data/docsite/ansible-docsite/plugin.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ Parameters
@{ parameters_rst(doc['options'] | remove_options_from_list(options_to_skip) | dictsort, suboption_key='suboptions') }@
{% endif %}
{% endif %}
{% if plugin_type != 'module' %}

.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
{% endif %}

.. Attributes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@
@{ deprecates_html(env['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
{% for myvar in value['vars'] %}
{% for mycli in value['cli'] %}
<li>
<p>Variable: @{ myvar['name'] | escape }@</p>
{% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
<p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(myvar['version_added'], myvar['version_added_collection'] or collection) }@</i></p>
<p>CLI argument: @{ mycli['option'] | escape }@</p>
{% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
<p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(mycli['version_added'], mycli['version_added_collection'] or collection) }@</i></p>
{% endif %}
@{ deprecates_html(myvar['deprecated'], collection, role_entrypoint=role_entrypoint) }@
@{ deprecates_html(mycli['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
{% for kw in value['keyword'] %}
Expand All @@ -118,13 +118,13 @@
@{ deprecates_html(kw['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
{% for mycli in value['cli'] %}
{% for myvar in value['vars'] %}
<li>
<p>CLI argument: @{ mycli['option'] | escape }@</p>
{% if mycli['version_added'] is still_relevant(collection=mycli['version_added_collection'] or collection) %}
<p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(mycli['version_added'], mycli['version_added_collection'] or collection) }@</i></p>
<p>Variable: @{ myvar['name'] | escape }@</p>
{% if myvar['version_added'] is still_relevant(collection=myvar['version_added_collection'] or collection) %}
<p><i style="font-size: small; color: darkgreen;">added in @{ version_added_html(myvar['version_added'], myvar['version_added_collection'] or collection) }@</i></p>
{% endif %}
@{ deprecates_html(mycli['deprecated'], collection, role_entrypoint=role_entrypoint) }@
@{ deprecates_html(myvar['deprecated'], collection, role_entrypoint=role_entrypoint) }@
</li>
{% endfor %}
</ul>
Expand Down
9 changes: 9 additions & 0 deletions src/antsibull_docs/data/docsite/simplified-rst/plugin.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ Parameters

@{ parameters_html(doc['options'] | remove_options_from_list(options_to_skip) | dictsort, suboption_key='suboptions') }@
{% endif %}
{% if plugin_type != 'module' %}

.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
{% endif %}

{% if doc['attributes'] %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ example: ``input | ns2.col.bar(key1=value1, key2=value2, ...)``
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ This describes the input of the test, the value before ``is ns2.col.bar`` or ``i
.. Options


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ Parameters
Alternative: nothing


- Keyword: become\_exe

- Variable: ansible\_become\_exe

- Variable: ansible\_foo\_exe
Expand All @@ -229,8 +231,6 @@ Parameters
Alternative: nothing


- Keyword: become\_exe


.. raw:: html

Expand Down Expand Up @@ -299,13 +299,13 @@ Parameters

- Environment variable: :envvar:`ANSIBLE\_FOO\_USER`

- Variable: ansible\_become\_user

- Variable: ansible\_foo\_user
- Keyword: become\_user

:ansible-option-versionadded:`added in ns2.col 0.1.0`

- Keyword: become\_user
- Variable: ansible\_become\_user

- Variable: ansible\_foo\_user

:ansible-option-versionadded:`added in ns2.col 0.1.0`

Expand All @@ -315,6 +315,13 @@ Parameters
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ Parameters
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ Parameters
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ Synopsis
.. Options


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ Parameters
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ example: ``input | ns2.col.foo(key1=value1, key2=value2, ...)``
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ Parameters
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ examples: ``lookup('ns2.col.foo', key1=value1, key2=value2, ...)`` and ``query('
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ Parameters
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ Synopsis
.. Options


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ examples: ``input is ns2.col.foo(key1=value1, key2=value2, ...)`` and ``input is
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ Parameters
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ example: ``input | ns2.col.bar(key1=value1, key2=value2, ...)``
</div>


.. note::

Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order.
For example, a variable that is lower in the list will override a variable that is higher up.
The entry types are also ordered by precedence from low to high priority order.
For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).

.. Attributes


Expand Down
Loading