Ensure consistent sorting of configuration directives

This commit is contained in:
Raphaël Hertzog 2018-02-16 11:08:08 +01:00
parent 4c7d1d4f4e
commit 0fe2f7e66b
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
# This config file is managed by salt.
#
{%- for directive, value in config.items() %}
{%- for directive, value in config|dictsort %}
{%- if value is string or value is number %}
{{ directive }} {{ value }}
{%- else %}

View File

@ -16,20 +16,20 @@
{%- endif -%}
{%- endmacro %}
{% for directive, value in globals.items() -%}
{% for directive, value in globals|dictsort -%}
{{ print_directive(directive, value) }}
{% endfor %}
{%- for host, directives in hosts.items() %}
{%- for host, directives in hosts|dictsort %}
[{{ host }}]
{%- for directive, value in directives.items() %}
{%- for directive, value in directives|dictsort %}
{{ print_directive(directive, value) }}
{%- endfor %}
{% endfor %}
{%- for group, directives in groups.items() %}
{%- for group, directives in groups|dictsort %}
[{{ group }}]
{%- for directive, value in directives.items() %}
{%- for directive, value in directives|dictsort %}
{{ print_directive(directive, value) }}
{%- endfor %}
{% endfor %}