This commit is contained in:
tolerryan
2025-11-04 01:08:10 -06:00
parent 04bf6acbc4
commit b4786091be
2 changed files with 10 additions and 24 deletions

View File

@@ -1,19 +1,3 @@
variable "ip" {
description = "Ip address of vm"
type = string
default = "192.168.0.64" # Optional: A default value
}
variable "hostname" {
description = "test2"
type = string
default = "t2.micro" # Optional: A default value
}
variable "flask_token" {
type = string
}
resource "proxmox_lxc" "test2" {
target_node = "ryuk"
hostname = var.hostname
@@ -54,7 +38,9 @@ resource "proxmox_lxc" "test2" {
gw = "192.168.0.1"
}
provisioner "local-exec" {
command = "curl -k -X POST https://192.168.0.143:5000/setupansible/${var.hostname}/${var.ip} -H \"Authorization: Bearer ${var.flask_token}\""
module "ansible_setup" {
source = "./ansible_setup.tf"
hostname = "test2"
ip = "192.168.0.64"
}
}

View File

@@ -1,9 +1,3 @@
module "ansible_setup" {
source = "./provider.tf"
hostname = "wikmd"
ip = "192.168.0.56"
}
resource "proxmox_lxc" "wikmd" {
target_node = "ryuk"
hostname = var.hostname
@@ -43,4 +37,10 @@ resource "proxmox_lxc" "wikmd" {
ip = "${var.ip}/24"
gw = "192.168.0.1"
}
module "ansible_setup" {
source = "./ansible_setup.tf"
hostname = "wikmd"
ip = "192.168.0.56"
}
}