-
Notifications
You must be signed in to change notification settings - Fork 8
/
destroy_msrds.sh
executable file
·51 lines (42 loc) · 1.22 KB
/
destroy_msrds.sh
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
#!/bin/bash
set -e
current_dir=$(pwd)
script_name=$(basename "${BASH_SOURCE[0]}")
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
environment=$(basename $script_dir)
build_path_terraform=$script_dir/terraform
build_path_ansible=$script_dir/ansible
cd $build_path_terraform/01_rg && ./build.sh
cd $build_path_terraform/02_network && ./build.sh &
thread2=$!
cd $build_path_terraform/03_storage && ./build.sh &
thread3=$!
cd $build_path_terraform/04_wg && ./build.sh &
thread4=$!
cd $build_path_terraform/05_dc && ./build.sh &
thread5=$!
cd $build_path_terraform/07_rdg && ./build.sh &
thread7=$!
cd $build_path_terraform/08_dbfs && ./build.sh &
thread8=$!
wait $thread2
wait $thread3
wait $thread4
wait $thread5
wait $thread7
wait $thread8
cd $build_path_terraform/09_msrds && ./destroy.sh
echo "provisioning with ansible"
cd $build_path_ansible \
&& ./requirements_download.sh \
&& ansible-playbook -i inventory infra-dh-containers.yml --tags "docker_container_traefik"
# thread18
cd $build_path_ansible \
&& ansible-playbook -i inventory final-local-doc.yml &
thread18=$!
# thread20
cd $build_path_ansible \
&& ansible-playbook -i inventory final-windows-doc.yml &
thread20=$!
wait $thread18
wait $thread20