fix: support ssh 'command' option
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2024-10-04 11:44:37 +02:00
parent a7ac5ad637
commit 4c467aaf88
2 changed files with 8 additions and 3 deletions

View File

@ -2,6 +2,10 @@
#
# {{ ansible_managed }}
#
{% for key in unix_user.value.ssh.authorized_keys %}
{{ lookup('file', 'ssh/authorized_keys/' + key) }}
{% for authorized_key in unix_user.value.ssh.authorized_keys %}
{% if authorized_key.command is defined and authorized_key.command | length > 0 %}
command="{{ authorized_key.command }}" {{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }}
{% else %}
{{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }}
{% endif %}
{% endfor %}