Compare commits

...

3 Commits
v1.0.4 ... main

Author SHA1 Message Date
ef0b91ae3d fix: use try to set default for server list (#7)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-package Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build-package Pipeline was successful
Reviewed-on: #7
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-committed-by: Robert Kaussow <mail@thegeeklab.de>
2024-04-11 15:52:04 +02:00
a202dc8ef3 fix: use include match for server_netif_filter (#6)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-package Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build-package Pipeline was successful
Reviewed-on: #6
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-committed-by: Robert Kaussow <mail@thegeeklab.de>
2024-03-26 21:22:53 +01:00
a0fa66b93e feat: add var server_netif_filter to overwrite interface filter (#5)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-package Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build-package Pipeline was successful
Reviewed-on: #5
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-committed-by: Robert Kaussow <mail@thegeeklab.de>
2024-03-22 12:06:02 +01:00
2 changed files with 9 additions and 4 deletions

View File

@ -1,8 +1,8 @@
locals {
ipv4_addresses = {
for server_key, server in var.server : server.name => flatten([
for k, v in coalescelist(proxmox_virtual_environment_vm.server[server.name].ipv4_addresses, []) :
v if length(regexall("^(lo|docker|veth).*", proxmox_virtual_environment_vm.server[server.name].network_interface_names[k])) == 0
for k, v in try(proxmox_virtual_environment_vm.server[server.name].ipv4_addresses, []) :
v if length(regexall(try(server.netif_filter, var.server_netif_filter), proxmox_virtual_environment_vm.server[server.name].network_interface_names[k])) > 0
])
}
}
@ -10,8 +10,8 @@ locals {
locals {
ipv6_addresses = {
for server_key, server in var.server : server.name => flatten([
for k, v in coalescelist(proxmox_virtual_environment_vm.server[server.name].ipv6_addresses, []) :
v if length(regexall("^(lo|docker|veth).*", proxmox_virtual_environment_vm.server[server.name].network_interface_names[k])) == 0
for k, v in try(proxmox_virtual_environment_vm.server[server.name].ipv6_addresses, []) :
v if length(regexall(try(server.netif_filter, var.server_netif_filter), proxmox_virtual_environment_vm.server[server.name].network_interface_names[k])) > 0
])
}
}

View File

@ -43,3 +43,8 @@ variable "server_guest_agent" {
type = bool
default = false
}
variable "server_netif_filter" {
type = string
default = "^(eth|ens|enp).+"
}