chore: add pihole lxc

This commit is contained in:
2025-09-28 00:52:17 +10:00
parent e65da68f2d
commit 30e36beb93
4 changed files with 50 additions and 8 deletions

42
200-pihole.tf Normal file
View File

@@ -0,0 +1,42 @@
resource "proxmox_lxc" "pihole" {
depends_on = [
proxmox_vm_qemu.dev-docker
]
target_node = "pve-dev"
vmid = "200"
hostname = "pihole"
ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
password = var.ci_password
unprivileged = false
ostype = "debian"
onboot = true
start = true
startup = "order=1000"
ssh_public_keys = <<EOF
${var.ssh_key}
EOF
memory = "4096"
swap = "512"
rootfs {
storage = "local"
size = "8G"
}
features {
fuse = true
nesting = true
mount = "nfs;cifs"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "10.10.40.2/24"
gw = "10.10.40.1"
tag = 40
}
}

View File

@@ -7,7 +7,7 @@ resource "proxmox_lxc" "ghshr" {
target_node = "pve" target_node = "pve"
vmid = "201" vmid = "201"
hostname = "ghshr" hostname = "ghshr"
ostemplate = "local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst" ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
password = var.ci_password password = var.ci_password
unprivileged = false unprivileged = false
ostype = "debian" ostype = "debian"
@@ -24,7 +24,7 @@ resource "proxmox_lxc" "ghshr" {
swap = "512" swap = "512"
rootfs { rootfs {
storage = "local" storage = "local-zfs"
size = "8G" size = "8G"
} }

View File

@@ -3,9 +3,9 @@ resource "proxmox_lxc" "omada" {
proxmox_vm_qemu.dev-docker proxmox_vm_qemu.dev-docker
] ]
target_node = "pve" target_node = "pve"
vmid = "200" vmid = "203"
hostname = "omada" hostname = "omada"
ostemplate = "local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst" ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
password = var.ci_password password = var.ci_password
unprivileged = false unprivileged = false
ostype = "debian" ostype = "debian"
@@ -22,7 +22,7 @@ resource "proxmox_lxc" "omada" {
swap = "512" swap = "512"
rootfs { rootfs {
storage = "local" storage = "local-zfs"
size = "8G" size = "8G"
} }

View File

@@ -47,7 +47,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
efidisk { efidisk {
efitype = "4m" efitype = "4m"
storage = "local" storage = "local-zfs"
} }
disks { disks {
@@ -59,7 +59,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
} }
ide3 { ide3 {
cloudinit { cloudinit {
storage = "local" storage = "local-zfs"
} }
} }
} }
@@ -67,7 +67,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
scsi0 { scsi0 {
disk { disk {
size = 80 size = 80
storage = "local" storage = "local-zfs"
} }
} }
} }