-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
75 lines (72 loc) · 1.75 KB
/
Taskfile.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3'
tasks:
dependencies:
cmds:
- bash scripts/dependencies.sh
install:
preconditions:
- command -v asdf
- test -f .tool-versions
cmds:
- asdf install
asdf-update-tools:
preconditions:
- command -v bash
cmds:
- bash scripts/update_tools.sh
asdf-latest:
preconditions:
- command -v asdf
cmds:
- asdf latest --all
tf-docs:
preconditions:
- command -v terraform-docs
cmds:
- terraform-docs -c .terraform-docs.yml --recursive terragrunt
tf-fmt:
cmds:
- terraform fmt -recursive terragrunt/modules
tg-hclfmt:
cmds:
- terragrunt hclfmt --terragrunt-working-dir ./terragrunt
tg-remove-cache:
cmds:
- find . -type d -name ".terragrunt-cache" -exec rm -fr {} \; > /dev/null 2>&1
tg-init:
aliases:
- init
cmds:
- yes | terragrunt run-all init -reconfigure --terragrunt-working-dir ./terragrunt/ai/server
tg-apply:
aliases:
- apply
cmds:
- yes | terragrunt run-all apply --terragrunt-working-dir ./terragrunt/ai/server
tg-destroy:
aliases:
- destroy
cmds:
- yes | terragrunt run-all destroy --terragrunt-working-dir ./terragrunt/ai/server
tg-reset:
aliases:
- reset
cmds:
- task: tg-destroy
- task: tg-apply
pre-commit:
cmds:
- pre-commit run -a -v
pre-push:
cmds:
- task: tf-docs
- task: tf-fmt
- task: tg-hclfmt
- task: pre-commit
ssh:
preconditions:
- command -v ssh
cmds:
- MY_IP=$(terragrunt output --terragrunt-working-dir ./terragrunt/ai/server ipv4 | xargs);
- ssh-keygen -R "$MY_IP"; ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$MY_IP
interactive: true