From 51afc157af112a2c886dc658ce0461f016816262 Mon Sep 17 00:00:00 2001 From: Harm Jan Stam Date: Fri, 15 Dec 2023 18:45:21 +0100 Subject: [PATCH] Bugfix kv-secrets debug and import tasks (#516) Because the operation variable has no default within the rol its existence should be checked. --- deploy/ansible/roles-misc/0.2-kv-secrets/tasks/main.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy/ansible/roles-misc/0.2-kv-secrets/tasks/main.yaml b/deploy/ansible/roles-misc/0.2-kv-secrets/tasks/main.yaml index 85940d854d..54840b167b 100644 --- a/deploy/ansible/roles-misc/0.2-kv-secrets/tasks/main.yaml +++ b/deploy/ansible/roles-misc/0.2-kv-secrets/tasks/main.yaml @@ -32,7 +32,9 @@ - "use_msi_for_clusters: {{ use_msi_for_clusters }}" - "platform: {{ platform | upper }}" verbosity: 2 - when: operation == "fencing" + when: + - operation is defined + - operation == "fencing" # -------------------------------------+---------------------------------------8 # @@ -40,6 +42,7 @@ - name: "0.2 Key Vault: - Import S User tasks" ansible.builtin.import_tasks: "s_user.yaml" when: + - operation is defined - operation == "SoftwareAcquisition" @@ -49,6 +52,7 @@ - name: "0.2 Key Vault: - Import Fencing secrets" ansible.builtin.import_tasks: "fencing.yaml" when: + - operation is defined - operation == "fencing" - (database_high_availability and database_cluster_type == "AFA") or (scs_high_availability and scs_cluster_type == "AFA") # AFA (Azure Fencing Agent) @@ -62,6 +66,7 @@ ansible.builtin.import_tasks: "wincluster-witness.yaml" # TODO: update when clause more appropriately when: + - operation is defined - operation == "fencing" - (scs_high_availability or database_high_availability) - not use_msi_for_clusters