refactor: reorganize proxmox roles, add hardware acceleration, and update common config tasks

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2025-05-03 10:24:50 +02:00
parent e3c67a32e9
commit a913e1cbc0
25 changed files with 228 additions and 77 deletions

View File

@@ -1,9 +1,9 @@
---
- name: Create VM
community.general.proxmox_kvm:
api_user: root@pam
api_password: "{{ vault.pve.aya01.root.sudo }}"
api_host: "192.168.20.12"
api_user: "{{ proxmox_api_user }}@pam"
api_password: "{{ proxmox_api_password }}"
api_host: "{{ proxmox_api_host }}"
agent: true
name: "{{ vm.name }}"
vmid: "{{ vm.vmid }}"
@@ -11,6 +11,7 @@
cores: "{{ vm.cores }}"
memory: "{{ vm.memory }}"
net: "{{ vm.net }}"
hostpci: "{{ vm.hostpci | default({})}}"
scsihw: "virtio-scsi-pci"
ostype: "l26"
tags: "{{ proxmox_tags }}"
@@ -18,7 +19,8 @@
boot: "order=scsi0"
cpu: "x86-64-v2-AES"
ciuser: "{{ vm.ciuser }}"
cipassword: "{{ vm_secrets[proxmox_secrets_prefix + '_' + vm.name.replace('-', '_')] }}"
# cipassword: "{{ vm_secrets[proxmox_secrets_prefix + '_' + vm.name.replace('-', '_')] }}"
cipassword: "flyff369"
ipconfig:
ipconfig0: "ip=dhcp"
sshkeys: "{{ vm.sshkeys }}"