refactor: justfile targets
This commit is contained in:
@@ -2,18 +2,13 @@
|
||||
|
||||
opentofu_dir := "infra/"
|
||||
|
||||
up:
|
||||
just gen-ssh-pair
|
||||
tofu -chdir=infra init
|
||||
tofu -chdir=infra apply -auto-approve
|
||||
|
||||
just playbook
|
||||
just get-admin-conf
|
||||
up: tofu-apply
|
||||
down: tofu-destroy
|
||||
|
||||
tofu-init:
|
||||
tofu -chdir={{ opentofu_dir }} init -upgrade
|
||||
|
||||
tofu-apply: tofu-init gen-ssh-pair
|
||||
tofu-apply: tofu-init
|
||||
tofu -chdir={{ opentofu_dir }} apply -auto-approve
|
||||
|
||||
tofu-destroy: tofu-init
|
||||
@@ -46,7 +41,7 @@ playbook: build-inventory
|
||||
# ansible-playbook --inventory ansible/hosts.ini ansible/master-playbook.yaml --ssh-extra-args "-o StrictHostKeyChecking=no"
|
||||
# ansible-playbook --inventory ansible/hosts.ini ansible/worker-playbook.yaml --ssh-extra-args "-o StrictHostKeyChecking=no"
|
||||
|
||||
down: tofu-destroy
|
||||
clean:
|
||||
rm ansible/hosts.ini || true
|
||||
rm -r ansible/.ssh/ || true
|
||||
rm admin.conf || true
|
||||
|
||||
Reference in New Issue
Block a user