mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-23 01:04:32 +07:00
30 lines
577 B
Makefile
30 lines
577 B
Makefile
.POSIX:
|
|
.EXPORT_ALL_VARIABLES:
|
|
|
|
KUBECONFIG = ../metal/kubeconfig.yaml
|
|
KUBE_CONFIG_PATH = $(KUBECONFIG)
|
|
|
|
default: apply terraform-secrets
|
|
|
|
~/.terraform.d/credentials.tfrc.json:
|
|
terraform login
|
|
|
|
terraform.tfvars:
|
|
ansible-playbook tfvars.yml
|
|
|
|
.terraform.lock.hcl: ~/.terraform.d/credentials.tfrc.json versions.tf terraform.tfvars
|
|
terraform init
|
|
touch .terraform.lock.hcl
|
|
|
|
namespaces:
|
|
ansible-playbook namespaces.yml
|
|
|
|
plan: .terraform.lock.hcl
|
|
terraform plan
|
|
|
|
apply: .terraform.lock.hcl namespaces
|
|
terraform apply
|
|
|
|
terraform-secrets:
|
|
ansible-playbook terraform-secrets.yml
|