From dc33a1971d68f09ffaf584d792782082320b3e69 Mon Sep 17 00:00:00 2001 From: Kei Kori Date: Thu, 13 Apr 2023 13:52:35 +0900 Subject: [PATCH] [etcd] fix make-ssl-etcd.sh.j2; move pem files only if any new certs exist (#9974) --- roles/etcd/templates/make-ssl-etcd.sh.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/etcd/templates/make-ssl-etcd.sh.j2 b/roles/etcd/templates/make-ssl-etcd.sh.j2 index d727cff7c..e0dde401d 100644 --- a/roles/etcd/templates/make-ssl-etcd.sh.j2 +++ b/roles/etcd/templates/make-ssl-etcd.sh.j2 @@ -100,4 +100,6 @@ if [ -e "$SSLDIR/ca-key.pem" ]; then rm -f ca.pem ca-key.pem fi -mv *.pem ${SSLDIR}/ +if [ -n "$(ls -A *.pem)" ]; then + mv *.pem ${SSLDIR}/ +fi