-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdestroy_azfileshares.sh
executable file
·39 lines (33 loc) · 1 KB
/
destroy_azfileshares.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
#!/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/06_fileshare && ./destroy.sh
echo "provisioning with ansible"
cd $build_path_ansible \
&& ./requirements_download.sh \
&& ansible-playbook -i inventory final-local-doc.yml \
&& ansible-playbook -i inventory final-windows-doc.yml