WIP: Initial VM provisioning #4
|
@ -57,22 +57,6 @@
|
||||||
firewall: false
|
firewall: false
|
||||||
bridge: SRV
|
bridge: SRV
|
||||||
|
|
||||||
# Initial boot
|
|
||||||
# For some reason debian cloud images don't use
|
|
||||||
# cloud-init for networking on first boot (cloud-init files
|
|
||||||
# are regenerated AFTER networking starts). But we need the
|
|
||||||
# hostname to be registered with DHCP later on so ¯\_(ツ)_/¯
|
|
||||||
- name: Initial boot
|
|
||||||
when: create.changed is true
|
|
||||||
block:
|
|
||||||
- name: Start
|
|
||||||
community.general.proxmox_kvm:
|
|
||||||
state: started
|
|
||||||
register: start
|
|
||||||
- name: Wait 3 min # Initial apt update, apt upgrade, cloud-init
|
|
||||||
ansible.builtin.wait_for:
|
|
||||||
timeout: 180
|
|
||||||
|
|
||||||
# VM Configuration
|
# VM Configuration
|
||||||
- name: Resize disk
|
- name: Resize disk
|
||||||
community.general.proxmox_disk:
|
community.general.proxmox_disk:
|
||||||
|
@ -95,6 +79,22 @@
|
||||||
cores: 2
|
cores: 2
|
||||||
memory: 2048
|
memory: 2048
|
||||||
|
|
||||||
|
# Initial boot
|
||||||
|
# For some reason debian cloud images don't use
|
||||||
|
# cloud-init for networking on first boot (cloud-init files
|
||||||
|
# are regenerated AFTER networking starts). But we need the
|
||||||
|
# hostname to be registered with DHCP later on so ¯\_(ツ)_/¯
|
||||||
|
- name: Initial boot
|
||||||
|
when: create.changed is true
|
||||||
|
block:
|
||||||
|
- name: Start
|
||||||
|
community.general.proxmox_kvm:
|
||||||
|
state: started
|
||||||
|
register: start
|
||||||
|
- name: Wait 3 min # Initial apt update, apt upgrade, cloud-init
|
||||||
|
ansible.builtin.wait_for:
|
||||||
|
timeout: 180
|
||||||
|
|
||||||
- name: Retart VM
|
- name: Retart VM
|
||||||
community.general.proxmox_kvm:
|
community.general.proxmox_kvm:
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
- name: Install some stuff
|
- name: Install some stuff
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
lock_timeout: 120
|
|
||||||
name: qemu-guest-agent
|
name: qemu-guest-agent
|
||||||
become: true
|
become: true
|
||||||
- name: Enable some stuff
|
- name: Enable some stuff
|
||||||
|
|
Loading…
Reference in New Issue