Drive part of ansible context from terraform
This commit is contained in:
parent
0e1cd2e0e1
commit
63aa3a7216
2 changed files with 10 additions and 2 deletions
|
@ -1,2 +1,2 @@
|
||||||
hosts:
|
"hosts":
|
||||||
casey_ip: 108.61.221.88
|
"casey_ip": "108.61.221.88"
|
||||||
|
|
8
terraform/context.tf
Normal file
8
terraform/context.tf
Normal 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"
|
||||||
|
}
|
Loading…
Reference in a new issue