change setup

This commit is contained in:
tolerryan
2025-11-04 00:50:04 -06:00
parent 798037615a
commit af73640dd9
3 changed files with 26 additions and 21 deletions

View File

@@ -39,4 +39,23 @@ terraform {
#credentials are stored in semaphore secrets
backend "pg" {}
}
variable "hostname" {
type = string
}
variable "ip" {
type = string
}
variable "flask_token" {
type = string
sensitive = true
}
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}\""
}
}