iterate order; common; salt configs

This commit is contained in:
2019-04-12 21:46:06 -04:00
parent 42784e1d5b
commit 0c72d02792
10 changed files with 75 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
# Managed by salt
{% for host, config in pillar['ssh_config'].items() -%}
{% set hosts = pillar['ssh_config'].keys()|sort -%}
{% for host in hosts -%}
{% set config = pillar['ssh_config'][host] %}
Host {{host}}
{%- for key, val in config.items() %}
{%- set keys = config.keys()|sort %}
{%- for key in keys %}
{%- set val = config[key] %}
{{key}} {{val -}}
{% endfor %}
{% endfor -%}