fix: config ssh client config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-07-19 17:54:56 +02:00
parent 1cc08cdfbc
commit 26e57d7b6f
7 changed files with 98 additions and 36 deletions

View File

@ -2,6 +2,6 @@
#
# {{ ansible_managed }}
#
{% for key in unix_user.value.ssh_keys.public %}
{{ lookup('file', 'ssh/pubkeys/' + key) }}
{% for key in unix_user.value.ssh.authorized_keys %}
{{ lookup('file', 'ssh/authorized_keys/' + key) }}
{% endfor %}

14
templates/config.j2 Normal file
View File

@ -0,0 +1,14 @@
#jinja2: lstrip_blocks: True
#
# {{ ansible_managed }}
#
{% for config in unix_user.value.ssh.config %}
{% for property, value in config.items() %}
{% if property == "Host" %}
{{ property }} {{ value }}
{% else %}
{{ property }} = {{ value }}
{% endif %}
{% endfor %}
{% endfor %}