iterate order; common; salt configs
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
# Managed by Salt
|
||||
{% for comment, keydata in pillar['authorized_keys'].items() -%}
|
||||
{% set comments = pillar['authorized_keys'].keys()|sort -%}
|
||||
{% for comment in comments -%}
|
||||
{% set keydata = pillar['authorized_keys'][comment] -%}
|
||||
{{keydata}} {{comment}}
|
||||
{% endfor -%}
|
||||
|
||||
@@ -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 -%}
|
||||
|
||||
Reference in New Issue
Block a user