From 89cdcec5953550e1fe5a8a1e0974c9b31e736d1f Mon Sep 17 00:00:00 2001 From: "Adrien \"ze\" Urban" Date: Thu, 28 Oct 2021 11:46:57 +0200 Subject: [PATCH] fix: sort extra options in configuration Ensure extra options in generated configuration is sorted, to ensure stable configuration. --- salt/files/master.d/f_defaults.conf | 2 +- salt/files/minion.d/f_defaults.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/files/master.d/f_defaults.conf b/salt/files/master.d/f_defaults.conf index 83e6e18..01acfd9 100644 --- a/salt/files/master.d/f_defaults.conf +++ b/salt/files/master.d/f_defaults.conf @@ -1821,7 +1821,7 @@ alternative.mongo.{{ name }}: {{ value }} {% endif %} {%- endif %} -{%- for configname in cfg_master %} +{%- for configname in cfg_master|sort %} {%- if configname not in reserved_keys and configname not in default_keys %} {{ configname }}: {{ cfg_master[configname]| yaml(False) | indent(2) }} diff --git a/salt/files/minion.d/f_defaults.conf b/salt/files/minion.d/f_defaults.conf index fd8e932..3e5c38c 100644 --- a/salt/files/minion.d/f_defaults.conf +++ b/salt/files/minion.d/f_defaults.conf @@ -1251,7 +1251,7 @@ alternative.mongo.{{ name }}: {{ value }} {% endif %} {%- endif %} -{%- for configname in cfg_minion %} +{%- for configname in cfg_minion|sort %} {%- if configname not in reserved_keys and configname not in default_keys %} {%- if cfg_minion[configname] is iterable and cfg_minion[configname] is not mapping and cfg_minion[configname] is not string %} {{ configname }}: