WIP: Initial VM provisioning #4

Closed
cyclane wants to merge 38 commits from initial-vm-provisioning into main
2 changed files with 2 additions and 15 deletions
Showing only changes of commit 8b128060e3 - Show all commits

View File

@ -72,9 +72,6 @@
- name: Wait # Initial apt update, apt upgrade, cloud-init - name: Wait # Initial apt update, apt upgrade, cloud-init
ansible.builtin.wait_for: ansible.builtin.wait_for:
timeout: 180 timeout: 180
- name: Poweroff
community.general.proxmox_kvm:
state: stopped
# VM Configuration # VM Configuration
- name: Resize disk - name: Resize disk
@ -98,18 +95,7 @@
cores: 2 cores: 2
memory: 2048 memory: 2048
# We have now enabled qemu guest agent, but have not installed it - name: Retart VM
# Rebooting will timeout if started
- name: Retart VM # doesn't start if stopped
when:
- vm.status is defined
- vm.status == "running"
community.general.proxmox_kvm: community.general.proxmox_kvm:
state: restarted state: restarted
timeout: 60 timeout: 60
- name: Start VM # start if stopped
when:
- vm.status is defined
- vm.status != "running"
community.general.proxmox_kvm:
state: started

View File

@ -4,6 +4,7 @@
tasks: tasks:
- name: Wait for connection - name: Wait for connection
ansible.builtin.ping: ansible.builtin.ping:
ignore_unreachable: true
register: wait_conn register: wait_conn
retries: 30 retries: 30
delay: 10 delay: 10