-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 842 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
define OP_RUN
op run --env-file secrets.env --
endef
# tf
.PHONY: tf
tf: tf/fix
$(OP_RUN) terraform -chdir=./terraform apply -auto-approve -parallelism=30
tf/init:
$(OP_RUN) terraform -chdir=./terraform init -upgrade
tf/state:
$(OP_RUN) terraform -chdir=./terraform state list
tf/fix:
terraform fmt -recursive .
# ansible
.PHONY: ansible
ansible:
$(OP_RUN) ansible-playbook -i ./ansible/hosts.yaml ./ansible/index.yaml
ansible/deps:
ansible-galaxy collection install ansible.utils
# this seems really weird
ansible/upgrade-roles:
$(OP_RUN) ansible-galaxy role install -r ./ansible/roles/requirements.yaml --force -p ./ansible/roles
ansible/k3s:
$(OP_RUN) ansible-playbook -i ./ansible/hosts.yaml ./ansible/tasks/k3s.yaml
ansible/logrotate:
$(OP_RUN) ansible-playbook -i ./ansible/hosts.yaml ./ansible/tasks/logrotate.yaml