REFACTOR: VM creation and setup
This commit is contained in:
+10
-10
@@ -10,13 +10,19 @@
|
||||
api_token_secret: "{{ proxmox_token_secret }}"
|
||||
|
||||
clone: debian-13-cloud-init-template
|
||||
newid: 1041
|
||||
name: ansible-ci-test
|
||||
name: "{{ vm_hostname }}"
|
||||
storage: main
|
||||
format: qcow2
|
||||
full: true
|
||||
timeout: 500
|
||||
|
||||
- name: Sleep for 20 seconds to ensure that Proxmox has cloned the VM
|
||||
become: false
|
||||
ansible.builtin.wait_for:
|
||||
timeout: 20
|
||||
delegate_to: localhost
|
||||
changed_when: false
|
||||
|
||||
- name: Tweak the hardware settings
|
||||
become: false
|
||||
community.proxmox.proxmox_kvm:
|
||||
@@ -27,7 +33,7 @@
|
||||
api_token_id: ansible
|
||||
api_token_secret: "{{ proxmox_token_secret }}"
|
||||
|
||||
vmid: 1041
|
||||
name: "{{ vm_hostname }}"
|
||||
cores: 4
|
||||
memory: 4096 # Minimal value for debian based OS for smooth workflow
|
||||
update: true
|
||||
@@ -42,12 +48,6 @@
|
||||
api_token_id: ansible
|
||||
api_token_secret: "{{ proxmox_token_secret }}"
|
||||
|
||||
vmid: 1041
|
||||
name: "{{ vm_hostname }}"
|
||||
state: started
|
||||
|
||||
- name: Sleep for 3 minutes to ensure that cloud-init's done its thing
|
||||
become: false
|
||||
ansible.builtin.wait_for:
|
||||
timeout: 180
|
||||
delegate_to: localhost
|
||||
changed_when: false
|
||||
Reference in New Issue
Block a user