Skip to content

Instantly share code, notes, and snippets.

@VerosK
Created March 7, 2022 10:35
Show Gist options
  • Save VerosK/332625e7b8deff3fa5f24569402f9184 to your computer and use it in GitHub Desktop.
Save VerosK/332625e7b8deff3fa5f24569402f9184 to your computer and use it in GitHub Desktop.
Create Ansible inventory form terraform
resource "local_file" "inventory" {
filename = "../playbooks/hosts.txt"
content = <<EOT
[kube-masters]
aws_ec2.server.public_fqdn ansible_host=${aws_ec2.server.public_ip} ansible_user=ubuntu
EOT
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment