Drive part of ansible context from terraform

This commit is contained in:
Jake Howard 2020-02-21 21:51:16 +00:00
parent 0e1cd2e0e1
commit 63aa3a7216
Signed by: jake
GPG Key ID: 57AFB45680EDD477
2 changed files with 10 additions and 2 deletions

View File

@ -1,2 +1,2 @@
hosts:
casey_ip: 108.61.221.88
"hosts":
"casey_ip": "108.61.221.88"

8
terraform/context.tf Normal file
View File

@ -0,0 +1,8 @@
resource "local_file" "hosts" {
content = yamlencode({
hosts: {
casey_ip: vultr_server.casey.main_ip
}
})
filename = "${path.module}/../ansible/group_vars/all/hosts.yml"
}