-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaskfile.yml
83 lines (73 loc) · 1.9 KB
/
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
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
76
77
78
79
80
81
82
83
version: "3"
tasks:
aws.sts:
desc: Who am I in AWS
cmds:
- echo "Getting AWS STS credentials..."
- aws sts get-caller-identity
packer.init:
desc: Initialize Packer
cmds:
- echo "Initializing Packer..."
- packer init -upgrade packer.pkr.hcl
dir: ./packer
packer.format:
desc: Format the Packer Template
dir: ./packer
cmds:
- echo "Formatting Packer template..."
- packer fmt packer.pkr.hcl
packer.validate:
desc: Validate the Packer Template
dir: ./packer
cmds:
- echo "Validating Packer template..."
- packer validate packer.pkr.hcl
packer.build:
desc: Build the Packer Image
dir: ./packer
cmds:
- echo "Building Packer image..."
- packer build packer.pkr.hcl
ansible.check:
desc: Check the Ansible Playbook
dir: ./packer
cmds:
- echo "Checking Ansible playbook..."
- ansible-playbook --check playbook.yml
terraform.init:
desc: Initialize Terraform
dir: ./terraform
cmds:
- echo "Initializing Terraform..."
- terraform init
terraform.format:
desc: Format the Terraform Code
dir: ./terraform
cmds:
- echo "Formatting Terraform code..."
- terraform fmt
terraform.validate:
desc: Validate the Terraform Code
dir: ./terraform
cmds:
- echo "Validating Terraform code..."
- terraform validate
terraform.plan:
desc: Plan the Terraform Deployment
dir: ./terraform
cmds:
- echo "Planning Terraform deployment..."
- terraform plan
terraform.apply:
desc: Apply the Terraform Deployment
dir: ./terraform
cmds:
- echo "Applying Terraform deployment..."
- terraform apply -auto-approve
terraform.destroy:
desc: Destroy the Terraform Deployment
dir: ./terraform
cmds:
- echo "Destroying Terraform deployment..."
- terraform destroy -auto-approve