This commit is contained in:
Keiran Snowden
2023-01-28 17:21:52 -05:00
parent 4817a8a7bd
commit 52f0f1070e
4 changed files with 27 additions and 20 deletions

View File

@@ -0,0 +1,6 @@
{% for host, config in salt.pillar.get('ssh_hosts')[user].items() -%}
Host {{ host }}
{%- for key, val in config %}
{{ key }} {{ val }}
{%- endfor %}
{%- endfor %}

View File

@@ -80,7 +80,8 @@
{% if 'ssh_config' in data %}
/home/{{ user }}/.ssh/config:
file.managed:
- contents_pillar: users:{{ user }}:ssh_config
- source: 'salt://users/files/ssh_hosts.jinja'
#- contents_pillar: users:{{ user }}:ssh_config
- user: {{ user }}
- group: {{ user }}
- mode: 0400