From b3afe77bc0cef745effa8e406eb5b7c92fdc2d11 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 18 Oct 2025 20:29:22 +0000 Subject: [PATCH] output name and id to file --- provider.tf | 5 ++++- srv-debianlxc.tf | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/provider.tf b/provider.tf index d51d2bd..512f192 100644 --- a/provider.tf +++ b/provider.tf @@ -5,6 +5,9 @@ terraform { proxmox = { source = "telmate/proxmox" } + ansible = { + source = "ansible/ansible" + } } } @@ -24,4 +27,4 @@ provider "proxmox" { pm_api_url = var.proxmox_api_url pm_api_token_id = var.proxmox_api_token_id pm_api_token_secret = var.proxmox_api_token_secret -} \ No newline at end of file +} diff --git a/srv-debianlxc.tf b/srv-debianlxc.tf index 8315a71..648926a 100644 --- a/srv-debianlxc.tf +++ b/srv-debianlxc.tf @@ -23,4 +23,11 @@ resource "proxmox_lxc" "basic" { bridge = "vmbr0" ip = "dhcp" } -} \ No newline at end of file +} +resource "local_file" "Ans_inv" { + content = <<-DOC + hostname: ${proxmox_lxc.basic.hostname} + id: ${proxmox_lxc.basic.id} + DOC + filename = "${path.module}/output.txt" +}