summaryrefslogtreecommitdiffstats
path: root/roles/out/templates/etc/postfix/relay_clientcerts.j2
blob: 2ff5be979e0a5d29e3e66a5964b97d199db254e3 (plain)
1
2
3
4
5
6
# {{ ansible_managed }}
# /!\ WARNING: smtp_tls_fingerprint_digest MUST be sha256!

{% for h in groups.all | difference([inventory_hostname]) | sort %}
{{ lookup('pipe', 'openssl x509 -in certs/postfix/'+h+'.pem -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -c | sed "s/[^ =]*=\s*//"') }} {{ h }}
{% endfor %}