ssh_known_hosts: Use ssh certificate authority

This commit is contained in:
Timo Makinen 2024-03-23 19:51:32 +00:00
parent 7ce6d58923
commit b1c3597fa9

View file

@ -1,5 +1,5 @@
{% for host, vars in hostvars|dictsort %} {% set keys = lookup('fileglob', '/srv/sshca/ca/*.pub', wantlist=True) %}
{% if vars["ansible_ssh_host_key_ed25519_public"] is defined %} {% for key in keys %}
{{ host }} ssh-ed25519 {{ vars["ansible_ssh_host_key_ed25519_public"] }} {% set data = lookup('ansible.builtin.file', key) | split() %}
{% endif %} @cert-authority *.foo.sh {{ data[0:2] | join(' ') }}
{% endfor %} {% endfor %}