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}\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
10
testvm.tf
10
testvm.tf
@@ -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"
|
|
||||||
}
|
}
|
||||||
|
|||||||
8
wikmd.tf
8
wikmd.tf
@@ -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"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user