From 8b128060e3a09fbe138cf2eb4680328fff93021e Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Mon, 11 Sep 2023 00:07:56 +0100 Subject: [PATCH] improve playbooks --- infra/joplin/0000_proxmox_playbook.yaml | 16 +--------------- infra/joplin/0001_software_playbook.yaml | 1 + 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/infra/joplin/0000_proxmox_playbook.yaml b/infra/joplin/0000_proxmox_playbook.yaml index 15ccf42..4a46364 100644 --- a/infra/joplin/0000_proxmox_playbook.yaml +++ b/infra/joplin/0000_proxmox_playbook.yaml @@ -72,9 +72,6 @@ - name: Wait # Initial apt update, apt upgrade, cloud-init ansible.builtin.wait_for: timeout: 180 - - name: Poweroff - community.general.proxmox_kvm: - state: stopped # VM Configuration - name: Resize disk @@ -98,18 +95,7 @@ cores: 2 memory: 2048 - # We have now enabled qemu guest agent, but have not installed it - # Rebooting will timeout if started - - name: Retart VM # doesn't start if stopped - when: - - vm.status is defined - - vm.status == "running" + - name: Retart VM community.general.proxmox_kvm: state: restarted timeout: 60 - - name: Start VM # start if stopped - when: - - vm.status is defined - - vm.status != "running" - community.general.proxmox_kvm: - state: started diff --git a/infra/joplin/0001_software_playbook.yaml b/infra/joplin/0001_software_playbook.yaml index 6d940c3..4cd9611 100644 --- a/infra/joplin/0001_software_playbook.yaml +++ b/infra/joplin/0001_software_playbook.yaml @@ -4,6 +4,7 @@ tasks: - name: Wait for connection ansible.builtin.ping: + ignore_unreachable: true register: wait_conn retries: 30 delay: 10