From 06c2228bd10283cc8f10cf568c025facef1aeae6 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Sun, 3 Sep 2023 00:49:11 +0100 Subject: [PATCH] simplify test-vm-2 playbook --- infra/test-vm-2/proxmox-playbook.yaml | 38 ++++++++++----------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/infra/test-vm-2/proxmox-playbook.yaml b/infra/test-vm-2/proxmox-playbook.yaml index 2d31f50..e903380 100644 --- a/infra/test-vm-2/proxmox-playbook.yaml +++ b/infra/test-vm-2/proxmox-playbook.yaml @@ -13,27 +13,17 @@ community.general.proxmox_kvm: tags: - managed - register: vm - - name: Print VM data - ansible.builtin.debug: - var: vm - - name: Modify test-vm-2 - when: vm.vmid is defined - module_defaults: - community.general.proxmox_kvm: - vmid: "{{ vm.vmid }}" - block: - - name: Wait for test-vm-2 to exist - community.general.proxmox_kvm: - state: current - retries: 30 - delay: 10 - - name: Update test-vm-2 - community.general.proxmox_kvm: - cpu: x86-64-v3 - memory: 2048 - cores: 5 - update: true - - name: Start test-vm-2 - community.general.proxmox_kvm: - state: restarted + - name: Wait for test-vm-2 to exist + community.general.proxmox_kvm: + state: current + retries: 30 + delay: 10 + - name: Update test-vm-2 + community.general.proxmox_kvm: + cpu: x86-64-v3 + memory: 2048 + cores: 5 + update: true + - name: Start test-vm-2 + community.general.proxmox_kvm: + state: restarted