From a2411e298359682b2210798756b6dd62829e39d6 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 10 Oct 2023 18:05:51 +0200 Subject: x509/*: fix update/reload 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(-) (limited to 'roles') diff --git a/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 b/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 index f4b8259e..9b3da000 100644 --- a/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 +++ b/roles/x509/acmetool/cert/prepare/templates/reload.sh.j2 @@ -19,8 +19,8 @@ while read name; do 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" {% for src in file.src %} cat "{{ hostvars[inventory_hostname]['x509_certificate_path_' + src] }}" >> "{{ file.dest }}.new" - mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} + mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} {% endif %} {% if 'reload' in x509_certificate_renewal %} diff --git a/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 b/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 index 15f68cd9..c1e57fe9 100644 --- a/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 +++ b/roles/x509/ownca/cert/prepare/templates/updated.sh.j2 @@ -5,8 +5,8 @@ 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" {% for src in file.src %} cat "{{ lookup('vars', 'x509_certificate_path_' + src) }}" >> "{{ file.dest }}.new" -mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} +mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} {% endif %} {% if 'reload' in x509_certificate_renewal %} diff --git a/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 b/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 index 15f68cd9..c1e57fe9 100644 --- a/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 +++ b/roles/x509/selfsigned/cert/prepare/templates/updated.sh.j2 @@ -5,8 +5,8 @@ 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" {% for src in file.src %} cat "{{ lookup('vars', 'x509_certificate_path_' + src) }}" >> "{{ file.dest }}.new" -mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} +mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} {% endif %} {% if 'reload' in x509_certificate_renewal %} diff --git a/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 b/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 index 275ca189..e981fd0f 100644 --- a/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 +++ b/roles/x509/uacme/cert/prepare/templates/updated.sh.j2 @@ -18,8 +18,8 @@ chgrp "{{ uacme_cert_config.cert.group }}" $BASE_D/{{ uacme_cert_name }}-cert.pe 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" {% for src in file.src %} cat "{{ hostvars[inventory_hostname]['x509_certificate_path_' + src] }}" >> "{{ file.dest }}.new" -mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} +mv "{{ file.dest }}.new" "{{ file.dest }}" {% endfor %} {% endif %} -- cgit v1.2.3