this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: generate inventory from Terraform

+17 -5
+1
cluster/.gitignore
··· 1 + inventory.yml
+1 -3
cluster/Makefile
··· 1 1 .POSIX: 2 2 3 - IP_ADDRESS = $(shell cd ../infra && terraform output -raw instance_public_ip) 4 - 5 3 apply: 6 4 ansible-playbook \ 7 - --inventory "${IP_ADDRESS}", \ 5 + --inventory inventory.yml \ 8 6 main.yml
-2
cluster/group_vars/all.yml
··· 1 - ansible_user: ubuntu 2 - ansible_ssh_private_key_file: ../infra/private.pem 3 1 kubeconfig: kubeconfig.yaml
+15
infra/main.tf
··· 34 34 } 35 35 } 36 36 } 37 + 38 + resource "local_file" "inventory" { 39 + filename = "${path.root}/../cluster/inventory.yml" 40 + file_permission = "0644" 41 + content = yamlencode({ 42 + k3s = { 43 + hosts = { 44 + "${module.instance.public_ip}" = { 45 + ansible_user = "ubuntu" 46 + ansible_ssh_private_key_file = abspath(local_file.ssh_private_key.filename) 47 + } 48 + } 49 + } 50 + }) 51 + }