-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathplaybook-create-cloud-init-template.yml
34 lines (28 loc) · 1.21 KB
/
playbook-create-cloud-init-template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
# source: https://forum.proxmox.com/threads/regenerate-cloud-init-image-using-ansible.89964/
- name: "Creates a new cloud-init image"
hosts: proxmox
roles:
- { role: selfhostx.ansible.compute_instance, tags: compute_instance }
vars_files:
- MY_VAULT.yml
vars:
cloudinit_image_create_enable: true
# remove old template:
compute_instance_cloudinit_image_destroy_old: true
# required if no cluster with shared filesystem:
proxmox_create_node: node1
# proxmox_create_node_ansible: node1.domain.tld
vars_prompt:
- name: compute_instance_cloudinit_image
prompt: "Template to use (Examples: template-cloudinit-deb12-latest, template-cloudinit-ubuntu22-04-latest, ...) "
default: "template-cloudinit-deb12-latest"
private: false
- name: compute_instance_distribution
prompt: "which image do you want to use (centos7_amd64, centos8_stream_amd64, centos9_stream_amd64, debian10_amd64, debian11_amd64, debian12_amd64, ubuntu18_04_amd64, ubuntu20_04_amd64, ubuntu22_04_amd64): "
default: "debian12"
private: false
- name: compute_instance_storage
prompt: "Choose Storage: local, local-zfs "
default: "local-zfs"
private: false