From 524527ef9da5d64c0f04f70c1f67215967d242a8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 20 Dec 2023 13:41:28 +0100 Subject: x509: make ca-certificates accessable for role users --- roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'roles/x509/static-ca/cert/prepare/templates/updated.sh.j2') diff --git a/roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 b/roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 index f0757832..0842c527 100644 --- a/roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 +++ b/roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 @@ -4,7 +4,10 @@ install{% if 'mode' in file %} -m {{ file.mode }}{% endif %}{% if 'owner' in file %} -o {{ file.owner }}{% endif %}{% if 'group' in file %} -g {{ file.group }}{% endif %} /dev/null "{{ file.dest }}.new" {% for src in file.src %} -cat "{{ lookup('vars', 'x509_certificate_path_' + src) }}" >> "{{ file.dest }}.new" +{% set src_file = lookup('vars', 'x509_certificate_path_' + src) %} +{% if src_file != "" %} +cat "{{ src_file }}" >> "{{ file.dest }}.new" +{% endif %} {% endfor %} mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} -- cgit v1.2.3