From cc09f270ffa769780e959fb4d6a7da615a6094a6 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 8 Dec 2025 08:16:22 +0100 Subject: [PATCH] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20deployment=20tasks=20?= =?UTF-8?q?for=20Proxmox=20VM=20templates=20with=20customizable=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks/testing.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tasks/testing.yml diff --git a/tasks/testing.yml b/tasks/testing.yml new file mode 100644 index 0000000..95c17b9 --- /dev/null +++ b/tasks/testing.yml @@ -0,0 +1,43 @@ +- name: Deploy VM templates + hosts: node0 + + tasks: + # - name: Import variables from Ansible vault + # ansible.builtin.include_vars: secrets.yml + + - name: Deploy templates with proxmox_template_vm + ansible.builtin.include_role: + name: joshrnoll.homelab.proxmox_template_vm + vars: + # Required to provide at least one + proxmox_template_vm_distros: + - fedora + - ubuntu + + # Required proxmox credentials + proxmox_template_vm_proxmox_username: "{{ proxmox_username }}" # From Ansible vault + proxmox_template_vm_proxmox_api_token_id: "{{ proxmox_api_token_id }}" # From Ansible vault + proxmox_template_vm_proxmox_api_token_secret: "{{ proxmox_api_token_secret }}" # From Ansible vault + + # Optional customizations for ubuntu + proxmox_template_vm_ubuntu_storage: "hdd8t" + proxmox_template_vm_ubuntu_name: ubuntu-2204-template + proxmox_template_vm_ubuntu_memory: 4096 + proxmox_template_vm_ubuntu_cores: 1 + proxmox_template_vm_ubuntu_ciuser: "{{ ciuser }}" # From Ansible vault + proxmox_template_vm_ubuntu_cipassword: "{{ cipassword }}" # From Ansible vault + proxmox_template_vm_ubuntu_sshkeys: "{{ lookup('file', lookup('env', 'HOME') + '/.ssh/id_rsa.pub') }}" # gets your ssh key from /home/user/.ssh/id_rsa.pub -- customize this to your needs + proxmox_template_vm_ubuntu_vlan: 50 + + # Optional customizations for fedora + proxmox_template_vm_fedora_storage: "hdd8t" + proxmox_template_vm_fedora_name: fedora-40-template + proxmox_template_vm_fedora_memory: 4096 + proxmox_template_vm_fedora_cores: 1 + proxmox_template_vm_fedora_ciuser: "{{ ciuser }}" # From Ansible vault + proxmox_template_vm_fedora_cipassword: "{{ cipassword }}" # From Ansible vault + proxmox_template_vm_fedora_sshkeys: "{{ lookup('file', lookup('env', 'HOME') + '/.ssh/id_rsa.pub') }}" # gets your ssh key from /home/user/.ssh/id_rsa.pub -- customize this to your needs + proxmox_template_vm_fedora_vlan: 50 + + # Set to true if you have slow storage to avoid file locks + proxmox_template_vm_slow_storage: true \ No newline at end of file