ansible-role-unix-users/templates/authorized_keys.j2
Markus Pesch 4c467aaf88
Some checks reported errors
continuous-integration/drone/push Build was killed
fix: support ssh 'command' option
2024-10-04 11:44:44 +02:00

12 lines
423 B
Django/Jinja

#jinja2: lstrip_blocks: True
#
# {{ ansible_managed }}
#
{% 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 %}