From a3d30ad42cd975b10b896874e59dea15b6f12e76 Mon Sep 17 00:00:00 2001 From: Luca Marsella <34103646+marsluca@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:46:47 +0100 Subject: [PATCH] fix(etcd): default etcd_secret_changed to false (#13691) etcd_secret_changed is only set by check_certs.yml, which runs only when cert_management is "script". With cert_management set to "none", the "Restart etcd if certs changed" tasks fail because the variable is undefined. Signed-off-by: Luca Marsella --- roles/etcd/tasks/check_certs.yml | 3 +-- roles/etcd/tasks/main.yml | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/etcd/tasks/check_certs.yml b/roles/etcd/tasks/check_certs.yml index 39e5ac574..3f72adf3d 100644 --- a/roles/etcd/tasks/check_certs.yml +++ b/roles/etcd/tasks/check_certs.yml @@ -8,11 +8,10 @@ register: etcdcert_master run_once: true -- name: "Check_certs | Set default value for 'sync_certs', 'gen_certs' and 'etcd_secret_changed' to false" +- name: "Check_certs | Set default value for 'sync_certs' and 'gen_certs' to false" set_fact: sync_certs: false gen_certs: false - etcd_secret_changed: false etcd_member_requires_sync: false kubernetes_host_requires_sync: false diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml index 14e51331f..8584f25d7 100644 --- a/roles/etcd/tasks/main.yml +++ b/roles/etcd/tasks/main.yml @@ -1,4 +1,8 @@ --- +- name: Set default value for 'etcd_secret_changed' to false + set_fact: + etcd_secret_changed: false + - name: Check etcd certs include_tasks: check_certs.yml when: cert_management == "script"