From b4786091beee65aea7e701ce0590e2af82990c52 Mon Sep 17 00:00:00 2001 From: tolerryan <105945216+tolerryan@users.noreply.github.com> Date: Tue, 4 Nov 2025 01:08:10 -0600 Subject: [PATCH] test --- testvm.tf | 22 ++++------------------ wikmd.tf | 12 ++++++------ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/testvm.tf b/testvm.tf index 474b736..cc5b7ad 100644 --- a/testvm.tf +++ b/testvm.tf @@ -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" } } diff --git a/wikmd.tf b/wikmd.tf index 781a63d..ada25ce 100644 --- a/wikmd.tf +++ b/wikmd.tf @@ -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" + } }