-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathplaybook-compute-instance-netbox.yml
79 lines (66 loc) · 2.65 KB
/
playbook-compute-instance-netbox.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
# create VMs continue with baserole afterwards
- name: Create new VM via proxmox, cloud-init, netbox and inwx dns
# hosts: proxmox
hosts: proxmox
roles:
- { role: selfhostx.ansible.compute_instance, tags: compute_instance }
# - { role: selfhostx.ansible.baserole, tags: baserole }
vars_files:
- my_vault.yml
vars_prompt:
- name: compute_instance_hostname
prompt: "hostname (FQDN like newhost.domain.tld) "
private: false
- name: compute_instance_distribution
prompt: "Which Linux distribution is used (debian, ubuntu, centos) "
default: "debian"
private: false
- 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_memory_max
prompt: "Max Memory (in MiB) "
default: 2048
private: false
- name: compute_instance_cores
prompt: "Count of Cores (number) "
default: 2
private: false
- name: compute_instance_disksize
prompt: "size of Disk (in GB)"
default: 20
private: false
- name: compute_instance_storage
prompt: 'choose storage ("local", "local-zfs) '
default: "local-zfs"
private: false
- name: compute_instance_ip_v4
prompt: 'Specify name of v4 network (search with netbox_prefix_name_query_method) OR IPv4-address in CIDR-notation (i.e. 1.2.3.4/24) OR "no" for disabled IPv4 connectivity: '
private: false
default: "home_network_v4"
- name: compute_instance_ip_v6
prompt: 'Specify name of v6 network (searched with netbox_prefix_name_query_method) OR IPv6-address in CIDR-notation (i.e. 1:2:3:4::1/64) OR ip-address in CIDR-notation "no" for no IPv6 connectivity: '
private: false
default: "home_network_v6"
vars:
compute_instance_virtualization_provider: proxmox
compute_instance_ipam_provider: netbox
# DNS
compute_instance_dns_provider: hetzner
# compute_instance_dns_hetzner_api_token: "-> vault"
# compute_instance_dns_inwx_username: "-> vault"
# compute_instance_dns_inwx_password: "-> vault"
compute_instance_dns_ttl: 600
compute_instance_debug_mode_enable: true
# proxmox_create_node: node1
# proxmox_create_node_ansible: node1.domain.tld
proxmox_cluster_name: "proxcluster1"
cloudinit_os_default_user: debian
# change storage if needed:
# proxmox_snippet_storage: local
# proxmox_snippet_dir: "/var/lib/vz/snippets"
#cloudinit_os_ssh_pubkeys:
# - ssh-rsa AAAA... pubkey1
# - ssh-ed25519 AAA... pubkey2