From 05a274c076d9f721e4617392bd109bd3f9843d6a Mon Sep 17 00:00:00 2001 From: Akrugerus Date: Mon, 19 Apr 2021 17:49:05 -0500 Subject: [PATCH] refactor(tables.sls): remove dictsort from tables.sls This removes the behavior of sorting rules before execution which is not needed --- iptables/tables.sls | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iptables/tables.sls b/iptables/tables.sls index dc034e3..c12beda 100644 --- a/iptables/tables.sls +++ b/iptables/tables.sls @@ -14,16 +14,16 @@ chain_present_{{ t }}_{{ cn }}: {%- for cn, cv in firewall.get(t).items() %} {%- set pol = cv.policy | default('ACCEPT') %} {%- set rules = cv.rules | default({}) %} - {%- for rn, rv in rules|dictsort %} + {%- for rn in rules %} rule_{{ t }}_{{ cn }}_{{ rn }}: - {%- if rv['position'] is defined %} + {%- if rules[rn]['position'] is defined %} iptables.insert: {%- else %} iptables.append: {%- endif %} - table: {{ t }} - chain: {{ cn }} - {%- for k,v in rv.items() %} + {%- for k,v in rules[rn].items() %} - {{ k }}: '{{ v }}' {%- endfor %} - save: true