From 1c950086fac3979c41345dd75eeb2c6bd8034d67 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Sun, 5 Feb 2023 10:38:12 +0100 Subject: [PATCH] Remove redundant conditional;Remove debugging;Fix module parameters;Fix var reference --- .../ansible_payload/bootstrap/roles/metacluster/tasks/k3s.yml | 4 ---- .../upgrade/roles/decommission/tasks/storage.yml | 3 ++- .../upgrade/roles/decommission/tasks/virtualmachine.yml | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/k3s.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/k3s.yml index c73a537..11b4c97 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/k3s.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/k3s.yml @@ -75,10 +75,6 @@ kubeconfig: "{{ kubeconfig.path }}" register: patch_result until: - - patch_result.changed is defined - patch_result.changed is true retries: "{{ playbook.retries }}" delay: "{{ playbook.delay.short }}" - -- debug: - msg: "{{ patch_result }}" diff --git a/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/storage.yml b/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/storage.yml index ddb89e9..ab3d9c9 100644 --- a/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/storage.yml +++ b/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/storage.yml @@ -1,8 +1,9 @@ - name: Disable disk scheduling and evict replicas kubernetes.core.k8s: + api_version: longhorn.io/v1beta2 + kind: lhn name: "{{ decom_nodename }}" namespace: longhorn-system - kind: nodes.longhorn.io state: patched definition: | spec: diff --git a/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/virtualmachine.yml b/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/virtualmachine.yml index 48dd4fd..18de58e 100644 --- a/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/virtualmachine.yml +++ b/ansible/roles/firstboot/files/ansible_payload/upgrade/roles/decommission/tasks/virtualmachine.yml @@ -7,8 +7,8 @@ - name: Power off VM community.vmware.vmware_guest: - name: "{{ virtualmachine_details.hw_name }}" - folder: "{{ virtualmachine_details.hw_folder }}" + name: "{{ virtualmachine_details.instance.hw_name }}" + folder: "{{ virtualmachine_details.instance.hw_folder }}" state: poweredoff # state_change_timeout: "{{ playbook.delay.long }}"