From e004236b4cfa9735cc898ea372dcb99c199dd4b4 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 20 Dec 2023 00:12:57 +0100 Subject: rename: x509/ownca to x509/static-ca --- roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 (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 new file mode 100644 index 00000000..f0757832 --- /dev/null +++ b/roles/x509/static-ca/cert/prepare/templates/updated.sh.j2 @@ -0,0 +1,15 @@ +#!/bin/sh +{% if 'install' in x509_certificate_renewal %} +{% for file in x509_certificate_renewal.install %} + +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" +{% endfor %} +mv "{{ file.dest }}.new" "{{ file.dest }}" +{% endfor %} +{% endif %} +{% if 'reload' in x509_certificate_renewal %} + +{{ x509_certificate_renewal.reload | trim }} +{% endif %} -- cgit v1.2.3