refactor: justfile targets
This commit is contained in:
@@ -2,18 +2,13 @@
|
|||||||
|
|
||||||
opentofu_dir := "infra/"
|
opentofu_dir := "infra/"
|
||||||
|
|
||||||
up:
|
up: tofu-apply
|
||||||
just gen-ssh-pair
|
down: tofu-destroy
|
||||||
tofu -chdir=infra init
|
|
||||||
tofu -chdir=infra apply -auto-approve
|
|
||||||
|
|
||||||
just playbook
|
|
||||||
just get-admin-conf
|
|
||||||
|
|
||||||
tofu-init:
|
tofu-init:
|
||||||
tofu -chdir={{ opentofu_dir }} init -upgrade
|
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 -chdir={{ opentofu_dir }} apply -auto-approve
|
||||||
|
|
||||||
tofu-destroy: tofu-init
|
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/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"
|
# 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 ansible/hosts.ini || true
|
||||||
rm -r ansible/.ssh/ || true
|
rm -r ansible/.ssh/ || true
|
||||||
rm admin.conf || true
|
rm admin.conf || true
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
[masters]
|
|
||||||
master-0 ansible_host=10.150.0.2 ansible_user=root ansible_ssh_private_key_file=ansible/.ssh/key ansible_python_interpreter=auto_silent
|
|
||||||
master-1 ansible_host=10.150.0.4 ansible_user=root ansible_ssh_private_key_file=ansible/.ssh/key ansible_python_interpreter=auto_silent
|
|
||||||
|
|
||||||
[workers]
|
|
||||||
Reference in New Issue
Block a user