diff --git a/ansible/group_vars/all/vars b/ansible/group_vars/all/vars index aa1db5d..8ebf003 100644 --- a/ansible/group_vars/all/vars +++ b/ansible/group_vars/all/vars @@ -4,7 +4,7 @@ # Proxmox variables proxmox_user: "root@pam" proxmox_password: "{{ vault_proxmox_root_password }}" -proxmox_host: "main-street-usa" +proxmox_host: "main-street-usa.local.mk-labs.cloud" # DNS variables dns_server: "monorail" # .local.mk-labs.cloud" diff --git a/ansible/host_vars/big-thunder-mountain/old_vars b/ansible/host_vars/big-thunder-mountain/old_vars new file mode 100644 index 0000000..e7e6da8 --- /dev/null +++ b/ansible/host_vars/big-thunder-mountain/old_vars @@ -0,0 +1,58 @@ +--- +# file: host_vars/vm_template/vars +# Ansible vars template for hosts created via cloning. + +# Supported hypervisors: +# - Proxmox + +platform: "proxmox" + +# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) + +proxmox_clone_node: "fantasyland" + +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu +# - 24.04 +# - Fedora +# - 42 + +vm_os_distribution: "ubuntu" +vm_os_version: "24.04" + +# Current VM sizes are: +# - Small: 2 cores, 2GB memory, 8 GiB virtual disk +# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk +# - Large: 4 cores, 4GB memory, 32 GiB virtual disk +# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk +# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk +# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk + +vm_size: "large-plus" + +# Proxmox storage target. + +vm_storage: "general" + +# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups +# and backup groups. (ha_group will be factored out in the next functionality update.) + +ha_group: "pve03" +proxmox_host_target: "pve03" + +# Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also +# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address. + +ip_address: 10.1.71.52 +vm_mac_address: 'BC:24:11:11:BC:58' + +# Software +# Future enhancement will allow specification of additional software to automatically deploy to +# the VM after creation. + +#terraform_version: "1.11.3" + +# --- +vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" +hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn diff --git a/ansible/host_vars/big-thunder-mountain/vars b/ansible/host_vars/big-thunder-mountain/vars index e7e6da8..8d7a51c 100644 --- a/ansible/host_vars/big-thunder-mountain/vars +++ b/ansible/host_vars/big-thunder-mountain/vars @@ -7,19 +7,32 @@ platform: "proxmox" +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu (clone) +# - 24.04 +# - Fedora (clone) +# - 42 +# - Talos (create) +# - 1.11.5 + +vm_os_distribution: "talos" +vm_os_version: "1.11.5" + +# VM ISO +# Talos: talos-v1.11.5-nocloud-amd64.iso + +vm_iso_storage: "templates" +vm_iso: "talos-v{{ vm_os_version }}-nocloud-amd64.iso" + # This is the Proxmox node where all the VM templates are stored. (Templates are not global.) +# Comment out for VM create proxmox_clone_node: "fantasyland" -# Templates are named in the following format (all lower case): -- -# Current OS offerings are: -# - Ubuntu -# - 24.04 -# - Fedora -# - 42 +# Proxmox storage target. -vm_os_distribution: "ubuntu" -vm_os_version: "24.04" +vm_storage: "liberty-tree" # Current VM sizes are: # - Small: 2 cores, 2GB memory, 8 GiB virtual disk @@ -31,10 +44,6 @@ vm_os_version: "24.04" vm_size: "large-plus" -# Proxmox storage target. - -vm_storage: "general" - # Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups # and backup groups. (ha_group will be factored out in the next functionality update.) @@ -54,5 +63,37 @@ vm_mac_address: 'BC:24:11:11:BC:58' #terraform_version: "1.11.3" # --- + vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn + +# Dictionaries for VM resources +# - cores (quantity) +# - memory (MB) +# - virtual disk (GiB) + +vm_definitions: + small: + cores: 2 + memory: 2048 + disk: 8 + medium: + cores: 2 + memory: 4096 + disk: 16 + large: + cores: 4 + memory: 4096 + disk: 32 + large-plus: + cores: 4 + memory: 4096 + disk: 48 + xlarge: + cores: 4 + memory: 8192 + disk: 64 + xlarge-plus: + cores: 4 + memory: 8192 + disk: 128 diff --git a/ansible/host_vars/haunted-mansion/old_vars b/ansible/host_vars/haunted-mansion/old_vars new file mode 100644 index 0000000..057151d --- /dev/null +++ b/ansible/host_vars/haunted-mansion/old_vars @@ -0,0 +1,60 @@ +--- +# file: host_vars/vm_template/vars +# Ansible vars template for hosts created via cloning. + +# Supported hypervisors: +# - Proxmox + +platform: "proxmox" + +# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) + +proxmox_clone_node: "fantasyland" + +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu +# - 24.04 +# - Fedora +# - 42 + +vm_os_distribution: "ubuntu" +vm_os_version: "24.04" + +# Current VM sizes are: +# - Small: 2 cores, 2GB memory, 8 GiB virtual disk +# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk +# - Large: 4 cores, 4GB memory, 32 GiB virtual disk +# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk +# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk +# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk + +vm_size: "xlarge" + +# Proxmox storage target. + +vm_storage: "general" + +# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups +# and backup groups. (ha_group will be factored out in the next functionality update.) + +ha_group: "pve03" +proxmox_host_target: "pve03" + +# Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also +# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address. + +ip_address: 10.1.71.61 +vm_mac_address: 'BC:24:11:C9:3A:13' + +# Software +# Future enhancement will allow specification of additional software to automatically deploy to +# the VM after creation. + +#terraform_version: "1.11.3" + +# --- + + +vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" +hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn diff --git a/ansible/host_vars/haunted-mansion/vars b/ansible/host_vars/haunted-mansion/vars index 057151d..44696c3 100644 --- a/ansible/host_vars/haunted-mansion/vars +++ b/ansible/host_vars/haunted-mansion/vars @@ -7,19 +7,32 @@ platform: "proxmox" +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu (clone) +# - 24.04 +# - Fedora (clone) +# - 42 +# - Talos (create) +# - 1.11.5 + +vm_os_distribution: "talos" +vm_os_version: "1.11.5" + +# VM ISO +# Talos: talos-v1.11.5-nocloud-amd64.iso + +vm_iso_storage: "templates" +vm_iso: "talos-v{{ vm_os_version }}-nocloud-amd64.iso" + # This is the Proxmox node where all the VM templates are stored. (Templates are not global.) +# Comment out for VM create proxmox_clone_node: "fantasyland" -# Templates are named in the following format (all lower case): -- -# Current OS offerings are: -# - Ubuntu -# - 24.04 -# - Fedora -# - 42 +# Proxmox storage target. -vm_os_distribution: "ubuntu" -vm_os_version: "24.04" +vm_storage: "liberty-tree" # Current VM sizes are: # - Small: 2 cores, 2GB memory, 8 GiB virtual disk @@ -31,10 +44,6 @@ vm_os_version: "24.04" vm_size: "xlarge" -# Proxmox storage target. - -vm_storage: "general" - # Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups # and backup groups. (ha_group will be factored out in the next functionality update.) @@ -55,6 +64,36 @@ vm_mac_address: 'BC:24:11:C9:3A:13' # --- - vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn + +# Dictionaries for VM resources +# - cores (quantity) +# - memory (MB) +# - virtual disk (GiB) + +vm_definitions: + small: + cores: 2 + memory: 2048 + disk: 8 + medium: + cores: 2 + memory: 4096 + disk: 16 + large: + cores: 4 + memory: 4096 + disk: 32 + large-plus: + cores: 4 + memory: 4096 + disk: 48 + xlarge: + cores: 4 + memory: 8192 + disk: 64 + xlarge-plus: + cores: 4 + memory: 8192 + disk: 128 diff --git a/ansible/host_vars/peter-pans-flight/old_vars b/ansible/host_vars/peter-pans-flight/old_vars new file mode 100644 index 0000000..fe0dd58 --- /dev/null +++ b/ansible/host_vars/peter-pans-flight/old_vars @@ -0,0 +1,59 @@ +--- +# file: host_vars/vm_template/vars +# Ansible vars template for hosts created via cloning. + +# Supported hypervisors: +# - Proxmox + +platform: "proxmox" + +# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) + +proxmox_clone_node: "fantasyland" + +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu +# - 24.04 +# - Fedora +# - 42 + +vm_os_distribution: "ubuntu" +vm_os_version: "24.04" + +# Current VM sizes are: +# - Small: 2 cores, 2GB memory, 8 GiB virtual disk +# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk +# - Large: 4 cores, 4GB memory, 32 GiB virtual disk +# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk +# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk +# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk + +vm_size: "xlarge" + +# Proxmox storage target. + +vm_storage: "general" + +# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups +# and backup groups. (ha_group will be factored out in the next functionality update.) + +ha_group: "pve03" +proxmox_host_target: "pve03" + +# Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also +# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address. + +ip_address: 10.1.71.62 +vm_mac_address: 'BC:24:11:AA:8F:3A' + +# Software +# Future enhancement will allow specification of additional software to automatically deploy to +# the VM after creation. + +#terraform_version: "1.11.3" + +# --- + +vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" +hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn diff --git a/ansible/host_vars/peter-pans-flight/vars b/ansible/host_vars/peter-pans-flight/vars index fe0dd58..2ed3dc4 100644 --- a/ansible/host_vars/peter-pans-flight/vars +++ b/ansible/host_vars/peter-pans-flight/vars @@ -7,19 +7,32 @@ platform: "proxmox" +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu (clone) +# - 24.04 +# - Fedora (clone) +# - 42 +# - Talos (create) +# - 1.11.5 + +vm_os_distribution: "talos" +vm_os_version: "1.11.5" + +# VM ISO +# Talos: talos-v1.11.5-nocloud-amd64.iso + +vm_iso_storage: "templates" +vm_iso: "talos-v{{ vm_os_version }}-nocloud-amd64.iso" + # This is the Proxmox node where all the VM templates are stored. (Templates are not global.) +# Comment out for VM create proxmox_clone_node: "fantasyland" -# Templates are named in the following format (all lower case): -- -# Current OS offerings are: -# - Ubuntu -# - 24.04 -# - Fedora -# - 42 +# Proxmox storage target. -vm_os_distribution: "ubuntu" -vm_os_version: "24.04" +vm_storage: "liberty-tree" # Current VM sizes are: # - Small: 2 cores, 2GB memory, 8 GiB virtual disk @@ -31,10 +44,6 @@ vm_os_version: "24.04" vm_size: "xlarge" -# Proxmox storage target. - -vm_storage: "general" - # Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups # and backup groups. (ha_group will be factored out in the next functionality update.) @@ -57,3 +66,34 @@ vm_mac_address: 'BC:24:11:AA:8F:3A' vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn + +# Dictionaries for VM resources +# - cores (quantity) +# - memory (MB) +# - virtual disk (GiB) + +vm_definitions: + small: + cores: 2 + memory: 2048 + disk: 8 + medium: + cores: 2 + memory: 4096 + disk: 16 + large: + cores: 4 + memory: 4096 + disk: 32 + large-plus: + cores: 4 + memory: 4096 + disk: 48 + xlarge: + cores: 4 + memory: 8192 + disk: 64 + xlarge-plus: + cores: 4 + memory: 8192 + disk: 128 diff --git a/ansible/host_vars/space-mountain/old_vars b/ansible/host_vars/space-mountain/old_vars new file mode 100644 index 0000000..77f3c99 --- /dev/null +++ b/ansible/host_vars/space-mountain/old_vars @@ -0,0 +1,59 @@ +--- +# file: host_vars/vm_template/vars +# Ansible vars template for hosts created via cloning. + +# Supported hypervisors: +# - Proxmox + +platform: "proxmox" + +# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) + +proxmox_clone_node: "fantasyland" + +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu +# - 24.04 +# - Fedora +# - 42 + +vm_os_distribution: "ubuntu" +vm_os_version: "24.04" + +# Current VM sizes are: +# - Small: 2 cores, 2GB memory, 8 GiB virtual disk +# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk +# - Large: 4 cores, 4GB memory, 32 GiB virtual disk +# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk +# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk +# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk + +vm_size: "large-plus" + +# Proxmox storage target. + +vm_storage: "general" + +# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups +# and backup groups. (ha_group will be factored out in the next functionality update.) + +ha_group: "pve03" +proxmox_host_target: "pve03" + +# Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also +# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address. + +ip_address: 10.1.71.51 +vm_mac_address: 'BC:24:11:1A:E8:8C' + +# Software +# Future enhancement will allow specification of additional software to automatically deploy to +# the VM after creation. + +#terraform_version: "1.11.3" + +# --- + +vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" +hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn diff --git a/ansible/host_vars/space-mountain/vars b/ansible/host_vars/space-mountain/vars index 77f3c99..4237b4b 100644 --- a/ansible/host_vars/space-mountain/vars +++ b/ansible/host_vars/space-mountain/vars @@ -7,19 +7,32 @@ platform: "proxmox" +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu (clone) +# - 24.04 +# - Fedora (clone) +# - 42 +# - Talos (create) +# - 1.11.5 + +vm_os_distribution: "talos" +vm_os_version: "1.11.5" + +# VM ISO +# Talos: talos-v1.11.5-nocloud-amd64.iso + +vm_iso_storage: "templates" +vm_iso: "talos-v{{ vm_os_version }}-nocloud-amd64.iso" + # This is the Proxmox node where all the VM templates are stored. (Templates are not global.) +# Comment out for VM create proxmox_clone_node: "fantasyland" -# Templates are named in the following format (all lower case): -- -# Current OS offerings are: -# - Ubuntu -# - 24.04 -# - Fedora -# - 42 +# Proxmox storage target. -vm_os_distribution: "ubuntu" -vm_os_version: "24.04" +vm_storage: "liberty-tree" # Current VM sizes are: # - Small: 2 cores, 2GB memory, 8 GiB virtual disk @@ -31,10 +44,6 @@ vm_os_version: "24.04" vm_size: "large-plus" -# Proxmox storage target. - -vm_storage: "general" - # Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups # and backup groups. (ha_group will be factored out in the next functionality update.) @@ -57,3 +66,34 @@ vm_mac_address: 'BC:24:11:1A:E8:8C' vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn + +# Dictionaries for VM resources +# - cores (quantity) +# - memory (MB) +# - virtual disk (GiB) + +vm_definitions: + small: + cores: 2 + memory: 2048 + disk: 8 + medium: + cores: 2 + memory: 4096 + disk: 16 + large: + cores: 4 + memory: 4096 + disk: 32 + large-plus: + cores: 4 + memory: 4096 + disk: 48 + xlarge: + cores: 4 + memory: 8192 + disk: 64 + xlarge-plus: + cores: 4 + memory: 8192 + disk: 128 diff --git a/ansible/host_vars/splash-mountain/old_vars b/ansible/host_vars/splash-mountain/old_vars new file mode 100644 index 0000000..6c4d17e --- /dev/null +++ b/ansible/host_vars/splash-mountain/old_vars @@ -0,0 +1,59 @@ +--- +# file: host_vars/vm_template/vars +# Ansible vars template for hosts created via cloning. + +# Supported hypervisors: +# - Proxmox + +platform: "proxmox" + +# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) + +proxmox_clone_node: "fantasyland" + +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu +# - 24.04 +# - Fedora +# - 42 + +vm_os_distribution: "ubuntu" +vm_os_version: "24.04" + +# Current VM sizes are: +# - Small: 2 cores, 2GB memory, 8 GiB virtual disk +# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk +# - Large: 4 cores, 4GB memory, 32 GiB virtual disk +# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk +# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk +# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk + +vm_size: "large-plus" + +# Proxmox storage target. + +vm_storage: "general" + +# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups +# and backup groups. (ha_group will be factored out in the next functionality update.) + +ha_group: "pve03" +proxmox_host_target: "pve03" + +# Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also +# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address. + +ip_address: 10.1.71.53 +vm_mac_address: 'BC:24:11:84:D7:2F' + +# Software +# Future enhancement will allow specification of additional software to automatically deploy to +# the VM after creation. + +#terraform_version: "1.11.3" + +# --- + +vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" +hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn diff --git a/ansible/host_vars/splash-mountain/vars b/ansible/host_vars/splash-mountain/vars index 6c4d17e..2be1ff1 100644 --- a/ansible/host_vars/splash-mountain/vars +++ b/ansible/host_vars/splash-mountain/vars @@ -7,19 +7,32 @@ platform: "proxmox" +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu (clone) +# - 24.04 +# - Fedora (clone) +# - 42 +# - Talos (create) +# - 1.11.5 + +vm_os_distribution: "talos" +vm_os_version: "1.11.5" + +# VM ISO +# Talos: talos-v1.11.5-nocloud-amd64.iso + +vm_iso_storage: "templates" +vm_iso: "talos-v{{ vm_os_version }}-nocloud-amd64.iso" + # This is the Proxmox node where all the VM templates are stored. (Templates are not global.) +# Comment out for VM create proxmox_clone_node: "fantasyland" -# Templates are named in the following format (all lower case): -- -# Current OS offerings are: -# - Ubuntu -# - 24.04 -# - Fedora -# - 42 +# Proxmox storage target. -vm_os_distribution: "ubuntu" -vm_os_version: "24.04" +vm_storage: "liberty-tree" # Current VM sizes are: # - Small: 2 cores, 2GB memory, 8 GiB virtual disk @@ -31,10 +44,6 @@ vm_os_version: "24.04" vm_size: "large-plus" -# Proxmox storage target. - -vm_storage: "general" - # Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups # and backup groups. (ha_group will be factored out in the next functionality update.) @@ -57,3 +66,34 @@ vm_mac_address: 'BC:24:11:84:D7:2F' vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn + +# Dictionaries for VM resources +# - cores (quantity) +# - memory (MB) +# - virtual disk (GiB) + +vm_definitions: + small: + cores: 2 + memory: 2048 + disk: 8 + medium: + cores: 2 + memory: 4096 + disk: 16 + large: + cores: 4 + memory: 4096 + disk: 32 + large-plus: + cores: 4 + memory: 4096 + disk: 48 + xlarge: + cores: 4 + memory: 8192 + disk: 64 + xlarge-plus: + cores: 4 + memory: 8192 + disk: 128 diff --git a/ansible/host_vars/splash/vars b/ansible/host_vars/splash/vars new file mode 100644 index 0000000..1890cb7 --- /dev/null +++ b/ansible/host_vars/splash/vars @@ -0,0 +1,100 @@ +--- +# file: host_vars/vm_template/vars +# Ansible vars template for hosts creation via clone or create. + +# Supported hypervisors: +# - Proxmox + +platform: "proxmox" + +# Templates are named in the following format (all lower case): -- +# Current OS offerings are: +# - Ubuntu (clone) +# - 24.04 +# - Fedora (clone) +# - 42 +# - Talos (create) +# - 1.11.5 + +vm_os_distribution: "talos" +vm_os_version: "1.11.5" + +# VM ISO +# Talos: talos-v1.11.5-nocloud-amd64.iso + +vm_iso_storage: "templates" +vm_iso: "talos-v{{ vm_os_version }}-nocloud-amd64.iso" + +# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) +# Comment out for VM create + +proxmox_clone_node: "fantasyland" + +# Proxmox storage target. + +vm_storage: "liberty-tree" + +# Current VM sizes are: +# - Small: 2 cores, 2GB memory, 8 GiB virtual disk +# - Medium: 2 cores, 4GB memory, 16 GiB virtual disk +# - Large: 4 cores, 4GB memory, 32 GiB virtual disk +# - Large Plus: 4 cores, 4GB memory, 48 GiB virtual disk +# - Xlarge: 4 cores, 8GB memory, 64 GiB virtual disk +# - Xlarge Plus: 4 cores, 8GB memory, 128 GiB virtual disk + +vm_size: "small" + +# Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups +# and backup groups. (ha_group will be factored out in the next functionality update.) + +ha_group: "pve03" +proxmox_host_target: "tomorrowland" + +# Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also +# sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address. +# Comment out vm_mac_address if new MAC address should be generated + +ip_address: 10.1.71.99 +vm_mac_address: 'BC:24:11:97:C3:AA' + +# Software +# Future enhancement will allow specification of additional software to automatically deploy to +# the VM after creation. + +#terraform_version: "1.11.3" + +# --- + +vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" +hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn + +# Dictionaries for VM resources +# - cores (quantity) +# - memory (MB) +# - virtual disk (GiB) + +vm_definitions: + small: + cores: 2 + memory: 2048 + disk: 8 + medium: + cores: 2 + memory: 4096 + disk: 16 + large: + cores: 4 + memory: 4096 + disk: 32 + large-plus: + cores: 4 + memory: 4096 + disk: 48 + xlarge: + cores: 4 + memory: 8192 + disk: 64 + xlarge-plus: + cores: 4 + memory: 8192 + disk: 128 diff --git a/ansible/host_vars/vm_template/vars b/ansible/host_vars/vm_template/vars index 171e440..1a472ee 100644 --- a/ansible/host_vars/vm_template/vars +++ b/ansible/host_vars/vm_template/vars @@ -1,26 +1,39 @@ --- # file: host_vars/vm_template/vars -# Ansible vars template for hosts created via cloning. +# Ansible vars template for hosts creation via clone or create. # Supported hypervisors: # - Proxmox platform: "proxmox" -# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) - -proxmox_clone_node: "fantasyland" - # Templates are named in the following format (all lower case): -- # Current OS offerings are: -# - Ubuntu +# - Ubuntu (clone) # - 24.04 -# - Fedora +# - Fedora (clone) # - 42 +# - Talos (create) +# - 1.11.5 vm_os_distribution: "ubuntu" vm_os_version: "24.04" +# VM ISO +# Talos: talos-v1.11.5-nocloud-amd64.iso + +vm_iso_storage: "templates" +vm_iso: "talos-v{{ vm_os_version }}-nocloud-amd64.iso" + +# This is the Proxmox node where all the VM templates are stored. (Templates are not global.) +# Comment out for VM create + +proxmox_clone_node: "fantasyland" + +# Proxmox storage target. + +vm_storage: "general" + # Current VM sizes are: # - Small: 2 cores, 2GB memory, 8 GiB virtual disk # - Medium: 2 cores, 4GB memory, 16 GiB virtual disk @@ -31,18 +44,15 @@ vm_os_version: "24.04" vm_size: "large-plus" -# Proxmox storage target. - -vm_storage: "general" - # Proxmox does not yet do dynamic load balancing, the host target sets the target for HA groups # and backup groups. (ha_group will be factored out in the next functionality update.) ha_group: "pve03" -proxmox_host_target: "pve03" +proxmox_host_target: "tomorrowland" # Currently, only single NIC VMs using IPv4 are supported via cloning. The IP address also # sets the Proxmox VMID. The VMID is a combination of the 3rd and 4th octet of the IPv4 address. +# Comment out vm_mac_address if new MAC address should be generated ip_address: 10.1.71.249 # vm_mac_address: 'BC:24:11:11:BC:58' @@ -57,3 +67,38 @@ ip_address: 10.1.71.249 vm_clone_source: "{{ vm_os_distribution }}-{{ vm_os_version }}-{{ vm_size }}" hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn + +# Dictionaries for VM resources +# - cores (quantity) +# - memory (MB) +# - virtual disk (GiB) + +small: + cores: 2 + memory: 2048 + disk: 8 + +medium: + cores: 2 + memory: 4096 + disk: 16 + +large: + cores: 4 + memory: 4096 + disk: 32 + +large-plus: + cores: 4 + memory: 4096 + disk: 48 + +xlarge: + cores: 4 + memory: 8192 + disk: 64 + +xlarge-plus: + cores: 4 + memory: 8192 + disk: 128 diff --git a/ansible/inventory.yml b/ansible/inventory.yml index 1d7fbb9..20cba88 100755 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -90,6 +90,10 @@ internal_cluster: # int-worker01: int-worker02: +talos_cluster: + hosts: + splash: + fastpass_control_plane: hosts: space-mountain: diff --git a/ansible/playbooks/create_vm.yml b/ansible/playbooks/create_vm.yml new file mode 100755 index 0000000..ed6a126 --- /dev/null +++ b/ansible/playbooks/create_vm.yml @@ -0,0 +1,23 @@ +--- +- name: Master playbook to create VM + hosts: all + gather_facts: false + +- name: Proxmox Create VM Playbook + ansible.builtin.import_playbook: proxmox_create_vm.yml + +- name: Set cloud-init network + ansible.builtin.import_playbook: populate_cloud_init.yml + when: vm_os_distribution == "ubuntu" + +- name: DNS Playbook + ansible.builtin.import_playbook: add_dns_entry.yml + +- name: DHCP Playbook + ansible.builtin.import_playbook: add_dhcp_reservation.yml + +- name: Start VM Playbook + ansible.builtin.import_playbook: proxmox_start_vm.yml + +- name: Set Hostname Playbook + ansible.builtin.import_playbook: set_hostname.yml diff --git a/ansible/playbooks/proxmox_create_vm.yml b/ansible/playbooks/proxmox_create_vm.yml new file mode 100755 index 0000000..4163982 --- /dev/null +++ b/ansible/playbooks/proxmox_create_vm.yml @@ -0,0 +1,50 @@ +--- +- name: Create VM ID from IP address for Proxmox hosts + hosts: all + gather_facts: false + + tasks: + - name: Create Proxmox VMs + delegate_to: "localhost" + when: platform is defined and platform == "proxmox" + block: + - name: Create VM ID from IP address + ansible.builtin.set_fact: + vm_id: "{{ ip_address.split('.')[-2] }}{{ '%03d' % (ip_address.split('.')[-1] | int) }}" + + - name: Create VM with an EFI disk, with Secure Boot disabled by default + community.proxmox.proxmox_kvm: + api_user: "{{ proxmox_user }}" + api_password: "{{ proxmox_password }}" + api_host: "{{ proxmox_host }}" + name: "{{ inventory_hostname }}" + node: "{{ proxmox_clone_node }}" + vmid: "{{ vm_id }}" + net: + net0: "virtio,bridge=vmbr0" + ide: + ide0: "{{ vm_iso_storage }}:iso/{{ vm_iso }},media=cdrom" + scsihw: "virtio-scsi-single" + scsi: + scsi0: "{{ vm_storage }}:{{ vm_definitions[vm_size]['disk'] }},format=qcow2" + bios: "ovmf" + cpu: "x86-64-v2" + cores: "{{ vm_definitions[vm_size]['cores'] }}" + memory: "{{ vm_definitions[vm_size]['memory'] }}" + efidisk0: + storage: "{{ vm_storage }}" + format: raw + efitype: 4m + pre_enrolled_keys: false + timeout: 600 + + # - name: Add VM to HA group + # community.proxmox.proxmox_cluster_ha_resources: + # api_user: "{{ proxmox_user }}" + # api_password: "{{ proxmox_password }}" + # api_host: "{{ proxmox_host }}" + # name: vm:"{{ vm_id }}" + # state: "present" + # group: "{{ ha_group }}" + # max_relocate: 2 + # max_restart: 2 diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 43b195f..41871ab 100755 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -2,7 +2,7 @@ --- collections: - name: community.general - version: 11.1.0 + version: 11.4.1 # - name: nccurry.openshift # version: 1.4.0 @@ -14,3 +14,6 @@ collections: # version: 0.27.0 - name: kubernetes.core + + - name: community.proxmox + version: 1.4.0 \ No newline at end of file diff --git a/ansible/~/_out/talosconfig b/ansible/~/_out/talosconfig new file mode 100644 index 0000000..e35e5db --- /dev/null +++ b/ansible/~/_out/talosconfig @@ -0,0 +1,2 @@ +context: "" +contexts: {}