From 0fe2f7e66b68bebaa62247f670d43affe6cb9c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Fri, 16 Feb 2018 11:08:08 +0100 Subject: [PATCH] Ensure consistent sorting of configuration directives --- munin/files/munin-node.conf | 2 +- munin/files/munin.conf | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/munin/files/munin-node.conf b/munin/files/munin-node.conf index b8808af..001785e 100644 --- a/munin/files/munin-node.conf +++ b/munin/files/munin-node.conf @@ -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 %} diff --git a/munin/files/munin.conf b/munin/files/munin.conf index 5ab64c2..3109b73 100644 --- a/munin/files/munin.conf +++ b/munin/files/munin.conf @@ -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 %}