27 lines
646 B
Makefile
27 lines
646 B
Makefile
#!/usr/bin/env just
|
|
|
|
opentofu_dir := "infra/"
|
|
|
|
up: tofu-apply ansible-run-playbook
|
|
down: tofu-destroy
|
|
|
|
tofu-init:
|
|
tofu -chdir={{ opentofu_dir }} init -upgrade
|
|
|
|
tofu-apply: tofu-init
|
|
tofu -chdir={{ opentofu_dir }} apply -auto-approve
|
|
|
|
tofu-destroy: tofu-init
|
|
tofu -chdir={{ opentofu_dir }} apply -auto-approve -destroy
|
|
|
|
ansible-run-playbook:
|
|
ansible-playbook -i ansible/inventory/incus.yaml -c community.general.incus ansible/playbook.yaml
|
|
|
|
clean:
|
|
rm ansible/hosts.ini || true
|
|
rm -r ansible/.ssh/ || true
|
|
rm admin.conf || true
|
|
|
|
get-admin-conf:
|
|
incus exec master-0 -- cat /etc/kubernetes/admin.conf > k8s-admin.conf
|