-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
43 lines (42 loc) · 879 Bytes
/
Taskfile.yml
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
version: '3'
tasks:
install:
dir: scripts/dependencies
cmds:
- chmod +x terraform.sh && ./terraform.sh
- chmod +x ansible.sh && ./ansible.sh
silent: true
plan:
dir: terraform
cmds:
- terraform plan -var-file=".tfvars"
silent: true
apply:
dir: terraform
cmds:
- terraform apply -var-file=".tfvars"
silent: true
destroy:
dir: terraform
cmds:
- terraform destroy -var-file=".tfvars"
silent: true
init:
dir: terraform
cmds:
- terraform init
silent: true
run:
cmds:
- go run .
silent: true
gen_inventory:
dir: terraform
cmds:
- echo "$(terraform output -raw instance_ip) ansible_user=ubuntu" > ../ansible/inventory.ini
silent: true
ansible:
dir: ansible
cmds:
- ansible-playbook -i inventory.ini playbook.yml
silent: true