From ac3494efc5fa02ec1a02dd7808e19f489d741f67 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Mon, 11 Sep 2023 01:19:31 +0100 Subject: [PATCH] fix order of tasks --- infra/joplin/0000_proxmox_playbook.yaml | 32 ++++++++++++------------ infra/joplin/0001_software_playbook.yaml | 1 - 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/infra/joplin/0000_proxmox_playbook.yaml b/infra/joplin/0000_proxmox_playbook.yaml index 95bc871..ac4fa50 100644 --- a/infra/joplin/0000_proxmox_playbook.yaml +++ b/infra/joplin/0000_proxmox_playbook.yaml @@ -57,22 +57,6 @@ firewall: false 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 - name: Resize disk community.general.proxmox_disk: @@ -95,6 +79,22 @@ cores: 2 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 community.general.proxmox_kvm: state: restarted diff --git a/infra/joplin/0001_software_playbook.yaml b/infra/joplin/0001_software_playbook.yaml index 217af44..fa5dd05 100644 --- a/infra/joplin/0001_software_playbook.yaml +++ b/infra/joplin/0001_software_playbook.yaml @@ -15,7 +15,6 @@ - name: Install some stuff ansible.builtin.apt: update_cache: true - lock_timeout: 120 name: qemu-guest-agent become: true - name: Enable some stuff