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:
parent
9c40b400cf
commit
cd4cb5291b
14
maas/arif-home/00-machines.tf
Normal file
14
maas/arif-home/00-machines.tf
Normal 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
|
||||
}
|
@ -13,3 +13,11 @@ variable "spaces" {
|
||||
}))
|
||||
}))
|
||||
}
|
||||
|
||||
variable "asrock_machines" {
|
||||
type = list(object({
|
||||
host_name = string
|
||||
power_type = string
|
||||
mac_addr = string
|
||||
}))
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user