mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fix py3 docs build (#33345)
* Open file in binary mode to support py3 writes using bytes * Update sort filter to use an attribute, so that py3 can sort dictionaries
This commit is contained in:
2
docs/templates/cli_rst.j2
vendored
2
docs/templates/cli_rst.j2
vendored
@@ -77,7 +77,7 @@ Actions
|
||||
{% if actions[action]['options'] %}
|
||||
|
||||
|
||||
{% for option in actions[action]['options']|sort %}
|
||||
{% for option in actions[action]['options']|sort(attribute='options') %}
|
||||
.. option:: {% for switch in option['options'] if switch in actions[action]['option_names'] %}{{switch}} {% if option['arg'] %} <{{option['arg']}}>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}
|
||||
|
||||
{{ (option['desc']) }}
|
||||
|
||||
4
docs/templates/config.rst.j2
vendored
4
docs/templates/config.rst.j2
vendored
@@ -65,11 +65,11 @@ you can use the command line utility mentioned above (`ansible-config`) to brows
|
||||
{% if config['version_added'] %}
|
||||
:Version Added: {{config['version_added']}}
|
||||
{% endif %}
|
||||
{% for ini_map in config['ini']|sort %}
|
||||
{% for ini_map in config['ini']|sort(attribute='section') %}
|
||||
:Ini Section: {{ini_map['section']}}
|
||||
:Ini Key: {{ini_map['key']}}
|
||||
{% endfor %}
|
||||
{% for env_var_map in config['env']|sort %}
|
||||
{% for env_var_map in config['env']|sort(attribute='name') %}
|
||||
:Environment: :envvar:`{{env_var_map['name']}}`
|
||||
{% endfor %}
|
||||
{% if config['deprecated'] %}
|
||||
|
||||
Reference in New Issue
Block a user