ansible/roles/ssh_known_hosts/templates/ssh_known_hosts.j2

5 lines
227 B
Django/Jinja

{% set keys = lookup('fileglob', '/srv/sshca/ca/*.pub', wantlist=True) %}
{% for key in keys %}
{% set data = lookup('ansible.builtin.file', key) | split() %}
@cert-authority *.foo.sh {{ data[0:2] | join(' ') }}
{% endfor %}