simplify test-vm-2 playbook
Infrastructure / Check and run Ansbile playbooks (push) Successful in 1m50s Details

This commit is contained in:
Gleb Koval 2023-09-03 00:49:11 +01:00
parent 2fe1ffddc3
commit 06c2228bd1
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
1 changed files with 14 additions and 24 deletions

View File

@ -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