update
This commit is contained in:
parent
d0d852d7f3
commit
d3baed4805
2 changed files with 29 additions and 127 deletions
|
|
@ -56,17 +56,17 @@ locals {
|
||||||
# node = ["mothership", "overlord", "vanguard"]
|
# node = ["mothership", "overlord", "vanguard"]
|
||||||
# ip = ["31", "32", "33"]
|
# ip = ["31", "32", "33"]
|
||||||
#}
|
#}
|
||||||
#postgres = {
|
postgres = {
|
||||||
# tags = "postgres"
|
tags = "postgres"
|
||||||
# count = 3
|
count = 3
|
||||||
# name = ["postgres-01", "postgres-02", "postgres-03"]
|
name = ["postgres-01", "postgres-02", "postgres-03"]
|
||||||
# cores = 4
|
cores = 4
|
||||||
# memory = "4096"
|
memory = "4096"
|
||||||
# drive = 40
|
drive = 40
|
||||||
# storage = "cache-domains"
|
storage = "cache-domains"
|
||||||
# node = ["mothership", "overlord", "vanguard"]
|
node = ["mothership", "overlord", "vanguard"]
|
||||||
# ip = ["34", "35", "36"]
|
ip = ["34", "35", "36"]
|
||||||
#}
|
}
|
||||||
pihole = {
|
pihole = {
|
||||||
tags = "pihole"
|
tags = "pihole"
|
||||||
count = 3
|
count = 3
|
||||||
|
|
|
||||||
|
|
@ -1,116 +1,18 @@
|
||||||
#resource "proxmox_vm_qemu" "haproxy" {
|
module "k3s_masters" {
|
||||||
# count = local.haproxy.count
|
# Use 'git::' prefix and append the branch/tag/commit with '?ref='
|
||||||
# ciuser = "administrator"
|
source = "git::https://gitlab.durp.info/durfy/modules/terraform/proxmox-vm.git?ref=main"
|
||||||
# vmid = "${local.vlan}${local.haproxy.ip[count.index]}"
|
|
||||||
# name = local.haproxy.name[count.index]
|
# Inputs
|
||||||
# target_node = local.haproxy.node[count.index]
|
count = local.postgres.count
|
||||||
# clone = local.template
|
vm_names = local.postgres.name
|
||||||
# tags = local.haproxy.tags
|
target_nodes = local.postgres.node
|
||||||
# qemu_os = "l26"
|
vm_ips = local.postgres.ip
|
||||||
# full_clone = true
|
vlan = local.vlan
|
||||||
# os_type = "cloud-init"
|
template = local.template
|
||||||
# agent = 1
|
storage = local.postgres.storage
|
||||||
# cores = local.haproxy.cores
|
cores = local.postgres.cores
|
||||||
# sockets = 1
|
memory = local.postgres.memory
|
||||||
# cpu_type = "host"
|
sshkeys = local.sshkeys
|
||||||
# memory = local.haproxy.memory
|
dnsserver = local.dnsserver
|
||||||
# scsihw = "virtio-scsi-pci"
|
drive_size = local.postgres.drive
|
||||||
# #bootdisk = "scsi0"
|
}
|
||||||
# boot = "order=virtio0"
|
|
||||||
# onboot = true
|
|
||||||
# sshkeys = local.sshkeys
|
|
||||||
# vga {
|
|
||||||
# type = "serial0"
|
|
||||||
# }
|
|
||||||
# serial {
|
|
||||||
# id = 0
|
|
||||||
# type = "socket"
|
|
||||||
# }
|
|
||||||
# disks {
|
|
||||||
# ide {
|
|
||||||
# ide2 {
|
|
||||||
# cloudinit {
|
|
||||||
# storage = local.haproxy.storage
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# virtio {
|
|
||||||
# virtio0 {
|
|
||||||
# disk {
|
|
||||||
# size = local.haproxy.drive
|
|
||||||
# format = local.format
|
|
||||||
# storage = local.haproxy.storage
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# network {
|
|
||||||
# id = 0
|
|
||||||
# model = "virtio"
|
|
||||||
# bridge = "vmbr0"
|
|
||||||
# tag = local.vlan
|
|
||||||
# }
|
|
||||||
# #Cloud Init Settings
|
|
||||||
# ipconfig0 = "ip=192.168.${local.vlan}.${local.haproxy.ip[count.index]}/24,gw=192.168.${local.vlan}.1"
|
|
||||||
# searchdomain = "durp.loc"
|
|
||||||
# nameserver = local.dnsserver
|
|
||||||
#}
|
|
||||||
#
|
|
||||||
#resource "proxmox_vm_qemu" "postgres" {
|
|
||||||
# count = local.postgres.count
|
|
||||||
# ciuser = "administrator"
|
|
||||||
# vmid = "${local.vlan}${local.postgres.ip[count.index]}"
|
|
||||||
# name = local.postgres.name[count.index]
|
|
||||||
# target_node = local.postgres.node[count.index]
|
|
||||||
# clone = local.template
|
|
||||||
# tags = local.postgres.tags
|
|
||||||
# qemu_os = "l26"
|
|
||||||
# full_clone = true
|
|
||||||
# os_type = "cloud-init"
|
|
||||||
# agent = 1
|
|
||||||
# cores = local.postgres.cores
|
|
||||||
# sockets = 1
|
|
||||||
# cpu_type = "host"
|
|
||||||
# memory = local.postgres.memory
|
|
||||||
# scsihw = "virtio-scsi-pci"
|
|
||||||
# #bootdisk = "scsi0"
|
|
||||||
# boot = "order=virtio0"
|
|
||||||
# onboot = true
|
|
||||||
# sshkeys = local.sshkeys
|
|
||||||
# vga {
|
|
||||||
# type = "serial0"
|
|
||||||
# }
|
|
||||||
# serial {
|
|
||||||
# id = 0
|
|
||||||
# type = "socket"
|
|
||||||
# }
|
|
||||||
# disks {
|
|
||||||
# ide {
|
|
||||||
# ide2 {
|
|
||||||
# cloudinit {
|
|
||||||
# storage = local.postgres.storage
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# virtio {
|
|
||||||
# virtio0 {
|
|
||||||
# disk {
|
|
||||||
# size = local.postgres.drive
|
|
||||||
# format = local.format
|
|
||||||
# storage = local.postgres.storage
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# network {
|
|
||||||
# id = 0
|
|
||||||
# model = "virtio"
|
|
||||||
# bridge = "vmbr0"
|
|
||||||
# tag = local.vlan
|
|
||||||
# }
|
|
||||||
# #Cloud Init Settings
|
|
||||||
# ipconfig0 = "ip=192.168.${local.vlan}.${local.postgres.ip[count.index]}/24,gw=192.168.${local.vlan}.1"
|
|
||||||
# searchdomain = "durp.loc"
|
|
||||||
# nameserver = local.dnsserver
|
|
||||||
#}
|
|
||||||
#
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue