-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgcd
More file actions
executable file
·46 lines (34 loc) · 1.19 KB
/
gcd
File metadata and controls
executable file
·46 lines (34 loc) · 1.19 KB
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
#!/bin/bash
command=$1
if [ "$command" = "init" ]; then
TERRAFORM_DIR="./provisioning"
echo "Initializing Terraform..."
terraform -chdir="$TERRAFORM_DIR" init
echo "Applying Terraform..."
terraform -chdir="$TERRAFORM_DIR" apply -auto-approve
ansible-playbook ./playbooks/efs.yml
fi
if [ "$command" = "start" ]; then
TERRAFORM_DIR="./provisioning"
echo "Initializing Terraform..."
terraform -chdir="$TERRAFORM_DIR" init
echo "Applying Terraform..."
terraform -chdir="$TERRAFORM_DIR" apply -auto-approve
ansible-playbook ./playbooks/efs.yml
ansible-playbook ./playbooks/tekton.yml
ansible-playbook ./playbooks/tekton-resource.yml
ansible-playbook ./playbooks/argocd.yml
ansible-playbook ./playbooks/argocd-resource.yml
fi
if [ "$command" = "add" ]; then
ansible-playbook ./playbooks/tekton-resource.yml
ansible-playbook ./playbooks/argocd-resource.yml
fi
if [ "$command" = "tekton" ]; then
ansible-playbook ./playbooks/tekton.yml
ansible-playbook ./playbooks/tekton-resource.yml
fi
if [ "$command" = "argocd" ]; then
ansible-playbook ./playbooks/argocd.yml
ansible-playbook ./playbooks/argocd-resource.yml
fi