back to basics
This commit is contained in:
@@ -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}\""
|
||||
}
|
||||
}
|
||||
@@ -37,10 +37,8 @@ resource "proxmox_lxc" "test2" {
|
||||
ip = "192.168.0.64/24"
|
||||
gw = "192.168.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
module "ansible_setup_test2" {
|
||||
source = "./modules/ansible_setup"
|
||||
hostname = "test2"
|
||||
ip = "192.168.0.64"
|
||||
provisioner "local-exec" {
|
||||
command = "curl -k -X POST https://192.168.0.143:5000/setupansible/test2/192.168.0.64 -H "Authorization: Bearer ${flask_token}"
|
||||
}
|
||||
}
|
||||
|
||||
8
wikmd.tf
8
wikmd.tf
@@ -37,10 +37,8 @@ resource "proxmox_lxc" "wikmd" {
|
||||
ip = "192.168.0.56/24"
|
||||
gw = "192.168.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
module "ansible_setup_wikmd" {
|
||||
source = "./modules/ansible_setup"
|
||||
hostname = "wikmd"
|
||||
ip = "192.168.0.56"
|
||||
provisioner "local-exec" {
|
||||
command = "curl -k -X POST https://192.168.0.143:5000/setupansible/wikmd/192.168.0.56 -H "Authorization: Bearer ${flask_token}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user