diff options
author | Christian Pointner <equinox@spreadspace.org> | 2023-12-20 13:41:28 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2023-12-20 13:41:28 +0100 |
commit | 524527ef9da5d64c0f04f70c1f67215967d242a8 (patch) | |
tree | 0697689dda5ae56ba74ac8551eeab37f446b9c95 /roles/x509/static-ca/cert/prepare/templates | |
parent | x509: add new role managed-ca (diff) |
x509: make ca-certificates accessable for role users
Diffstat (limited to 'roles/x509/static-ca/cert/prepare/templates')
-rw-r--r-- | roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 | 5 |
1 files changed, 4 insertions, 1 deletions
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 %} |