This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
hermes/main.tf

41 lines
880 B
Terraform
Raw Normal View History

2023-03-11 16:10:21 +00:00
terraform {
backend "pg" {
schema_name = "dmz_dns"
conn_str = "postgres://terraform@10.42.0.1/terraform_state"
2023-03-11 16:10:21 +00:00
}
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
template = {
source = "hashicorp/template"
}
}
}
provider "libvirt" {
2023-04-09 11:50:29 +00:00
uri = "qemu+ssh://root@atlas.lan/system"
2023-03-11 16:10:21 +00:00
}
2023-04-10 11:30:03 +00:00
locals {
ansible_command = join(" ", [
"ANSIBLE_ROLES_PATH=roles",
"ANSIBLE_HOST_KEY_CHECKING=False",
"ANSIBLE_VAULT_PASSWORD_FILE=util/secret-service-client.sh",
"ansible-playbook",
"-u root",
"-i '192.168.30.7,'",
"hermes.yml"
])
}
module "vm" {
source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
name = "hermes"
use_host_cert = false
fixed_address = "192.168.30.7/24"
2023-04-10 11:30:03 +00:00
ansible_command = local.ansible_command
mac = "CA:FE:C0:FF:EE:07"
2023-03-11 16:10:21 +00:00
}