From a91cbe9926d1dc880fc1b6936e408c0ba179d201 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 26 Oct 2023 13:32:45 +0200 Subject: x509/certs: fix renewal scripts --- roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 | 2 +- roles/x509/ownca/cert/prepare/templates/updated.sh.j2 | 2 +- roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 | 2 +- roles/x509/uacme/cert/prepare/templates/updated.sh.j2 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 b/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 index 9b3da000..d707357b 100644 --- a/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 +++ b/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 @@ -16,7 +16,7 @@ while read name; do {% 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 'owner' in file %} -g {{ file.group }}{% endif %} /dev/null "{{ file.dest }}.new" + 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 "{{ hostvars[inventory_hostname]['x509_certificate_path_' + src] }}" >> "{{ file.dest }}.new" {% endfor %} diff --git a/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 b/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 index c1e57fe9..f0757832 100644 --- a/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 +++ b/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 @@ -2,7 +2,7 @@ {% 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 'owner' in file %} -g {{ file.group }}{% endif %} /dev/null "{{ file.dest }}.new" +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 %} diff --git a/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 b/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 index c1e57fe9..f0757832 100644 --- a/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 +++ b/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 @@ -2,7 +2,7 @@ {% 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 'owner' in file %} -g {{ file.group }}{% endif %} /dev/null "{{ file.dest }}.new" +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 %} diff --git a/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 b/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 index 6d58c8c4..b6bd20de 100644 --- a/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 +++ b/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 @@ -15,7 +15,7 @@ chgrp "{{ uacme_cert_config.cert.group }}" $BASE_D/{{ uacme_cert_name }}-cert.pe {% if x509_certificate_renewal is defined and '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 'owner' in file %} -g {{ file.group }}{% endif %} /dev/null "{{ file.dest }}.new" +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 "{{ hostvars[inventory_hostname]['x509_certificate_path_' + src] }}" >> "{{ file.dest }}.new" {% endfor %} -- cgit v1.2.3