Update to latest plans

Update the openstack ones so that they don't overlap devices in lab

Add the MAAS plans that had been staged for a bit
This commit is contained in:
Arif Ali 2024-02-08 19:05:24 +00:00
parent 9c40b400cf
commit cd4cb5291b
Signed by: arif
GPG Key ID: 369608FBA1353A70
6 changed files with 57 additions and 4 deletions

View File

@ -0,0 +1,14 @@
resource "maas_machine" "asrock_machines" {
for_each = {
for index, asrock_machines in var.asrock_machines:
asrock_machines.host_name => asrock_machines
}
power_parameters = {}
power_type = each.value.power_type
pxe_mac_address = each.value.mac_addr
hostname = each.value.host_name
zone = each.value.host_name
}

View File

@ -13,3 +13,11 @@ variable "spaces" {
}))
}))
}
variable "asrock_machines" {
type = list(object({
host_name = string
power_type = string
mac_addr = string
}))
}

View File

@ -51,6 +51,6 @@ resource "maas_subnet_ip_range" "dynamic_ip_ranges" {
type = each.value.type
start_ip = each.value.start_ip
end_ip = each.value.end_ip
comment = each.value.comment
comment = each.value.comment == "Dynamic"?"":each.value.comment
}

View File

@ -143,5 +143,36 @@ spaces = [
comment = "Servers"
}
]
},
{
space="add-new-test",
vid=306,
cidr="10.0.7.0/24",
mtu=1500,
managed=true,
ip_range = []
}
]
asrock_machines = [
{
host_name = "asrock01"
power_type = "manual",
mac_addr = "a8:a1:59:44:70:ac"
},
{
host_name = "asrock02"
power_type = "manual",
mac_addr = "a8:a1:59:44:76:79"
},
{
host_name = "asrock03"
power_type = "manual",
mac_addr = "a8:a1:59:44:73:f0"
},
{
host_name = "asrock04"
power_type = "manual",
mac_addr = "a8:a1:59:e4:92:b8"
}
]

View File

@ -9,6 +9,6 @@ terraform {
provider "maas" {
api_version = "2.0"
api_key = "cP5gj8RyemEhBLvyKG:AmRXEzR8MPAbRPWGBH:7T9LPemF3gAPe3qwr47rXAkLWZysjeRB"
api_key = "yvjRUz4B4FJtpC99Dc:gBSmTpFttb7x2WDkBD:jdWhHVBBGGu5D2vVtzMK3ks9fNTk9YuJ"
api_url = "http://10.0.1.253:5240/MAAS"
}

View File

@ -26,8 +26,8 @@ resource "openstack_networking_subnet_v2" "ext_net_subnet" {
]
allocation_pool {
start = "192.168.1.42"
end = "192.168.1.79"
start = "192.168.1.40"
end = "192.168.1.69"
}
}