back to basics

This commit is contained in:
tolerryan
2025-11-04 01:36:35 -06:00
parent d985249816
commit 83140ce9e6
3 changed files with 7 additions and 24 deletions

View File

@@ -1,13 +0,0 @@
variable "hostname" {
type = string
}
variable "ip" {
type = string
}
resource "null_resource" "ansible_setup" {
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}\""
}
}

View File

@@ -37,10 +37,8 @@ resource "proxmox_lxc" "test2" {
ip = "192.168.0.64/24" ip = "192.168.0.64/24"
gw = "192.168.0.1" gw = "192.168.0.1"
} }
}
provisioner "local-exec" {
module "ansible_setup_test2" { command = "curl -k -X POST https://192.168.0.143:5000/setupansible/test2/192.168.0.64 -H "Authorization: Bearer ${flask_token}"
source = "./modules/ansible_setup" }
hostname = "test2"
ip = "192.168.0.64"
} }

View File

@@ -37,10 +37,8 @@ resource "proxmox_lxc" "wikmd" {
ip = "192.168.0.56/24" ip = "192.168.0.56/24"
gw = "192.168.0.1" gw = "192.168.0.1"
} }
}
module "ansible_setup_wikmd" { provisioner "local-exec" {
source = "./modules/ansible_setup" command = "curl -k -X POST https://192.168.0.143:5000/setupansible/wikmd/192.168.0.56 -H "Authorization: Bearer ${flask_token}"
hostname = "wikmd" }
ip = "192.168.0.56"
} }