Skip to content

Commit

Permalink
Merge pull request #55 from Akrugerus/patch-1
Browse files Browse the repository at this point in the history
refactor(tables.sls): remove dictsort from tables.sls
  • Loading branch information
javierbertoli authored Apr 20, 2021
2 parents a7790ed + 05a274c commit 71fd6af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iptables/tables.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71fd6af

Please sign in to comment.