Compare commits

10 Commits

Author SHA1 Message Date
72a790c038 don't suffocate the vm
All checks were successful
Infrastructure / Check and run Ansbile playbooks (pull_request) Successful in 6m34s
2023-09-11 01:40:29 +01:00
dfcfe941cf actually fix order of things
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 11m8s
2023-09-11 01:27:02 +01:00
ac3494efc5 fix order of tasks
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 5m55s
2023-09-11 01:19:31 +01:00
6b2a820282 increase apt timeout
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 7m58s
2023-09-11 01:05:55 +01:00
6dfab582c4 wait for 3 min afterall
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 7m28s
2023-09-11 00:49:27 +01:00
41a0c9393e escalate to root for 0001
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 4m38s
2023-09-11 00:43:36 +01:00
92fbca47db fix wait for conn
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 7m22s
2023-09-11 00:34:59 +01:00
5b0bae4865 maybe fix wait for conn
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 6m10s
2023-09-11 00:23:37 +01:00
bc59bd5fdb wut
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 6m23s
2023-09-11 00:16:16 +01:00
8b128060e3 improve playbooks
Some checks failed
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 5m32s
2023-09-11 00:07:56 +01:00
2 changed files with 15 additions and 32 deletions

View File

@@ -45,7 +45,7 @@
delay: 10
until: vm.status is defined
# Networking
# Networking and initial config
- name: Add HOME NIC
community.general.proxmox_nic:
interface: net0
@@ -56,6 +56,14 @@
interface: net1
firewall: false
bridge: SRV
- name: Configure cloud-init
community.general.proxmox_kvm:
update: true
ciuser: debian
sshkeys: "{{ ssh_public }}"
ipconfig:
ipconfig0: ip=dhcp,ip6=auto
ipconfig1: ip=dhcp
# Initial boot
# For some reason debian cloud images don't use
@@ -69,12 +77,9 @@
community.general.proxmox_kvm:
state: started
register: start
- name: Wait # Initial apt update, apt upgrade, cloud-init
- name: Wait 3 min # 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
@@ -85,11 +90,6 @@
- name: Update VM
community.general.proxmox_kvm:
update: true
ciuser: debian
sshkeys: "{{ ssh_public }}"
ipconfig:
ipconfig0: ip=dhcp,ip6=auto
ipconfig1: ip=dhcp
agent: enabled=1
tags:
- debian-12
@@ -98,18 +98,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

View File

@@ -3,16 +3,8 @@
gather_facts: false
tasks:
- name: Wait for connection
ansible.builtin.ping:
register: wait_conn
retries: 30
delay: 10
until: wait_conn.ping is defined
# ansible.builtin.wait_for:
# host: "{{ inventory_hostname }}"
# port: 22
# timeout: 300
# delegate_to: localhost
ansible.builtin.wait_for_connection:
timeout: 300
- name: Test some stuff
ansible.builtin.shell: |
touch ~/hmm
@@ -24,8 +16,10 @@
ansible.builtin.apt:
update_cache: true
name: qemu-guest-agent
become: true
- name: Enable some stuff
ansible.builtin.systemd:
name: qemu-guest-agent
state: started
enabled: true
become: true