-
Notifications
You must be signed in to change notification settings - Fork 8
/
apply_msrds.sh
executable file
·96 lines (77 loc) · 2.45 KB
/
apply_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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/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=$!
cd $build_path_terraform/09_msrds && ./build.sh &
thread9=$!
wait $thread2
wait $thread3
wait $thread4
wait $thread5
wait $thread7
wait $thread8
wait $thread9
[ "$vms_already_alive" = true ] || (echo "wait 5 minutes to VM provisioning ..."; sleep 5m)
echo "provisioning with ansible"
cd $build_path_ansible \
&& ./requirements_download.sh \
&& ansible-playbook -i inventory generic-domain-members.yml --limit "windows_rdg,windows_rdcb,windows_rdsh"
cd $build_path_ansible \
&& ansible-playbook -i inventory generic-rdcb.yml &
thread10=$!
cd $build_path_ansible \
&& ansible-playbook -i inventory generic-rdg.yml --tags "win_feature_rds_web_access" &
thread11=$!
cd $build_path_ansible \
&& ansible-playbook -i inventory generic-rdsh.yml \
&& ansible-playbook -i inventory infra-rdsh-fslogix.yml \
&& ansible-playbook -i inventory infra-rdsh-apps.yml &
thread12=$!
wait $thread10
wait $thread11
wait $thread12
cd $build_path_ansible \
&& ansible-playbook -i inventory infra-dh-containers.yml --tags "docker_container_traefik" &
thread13=$!
cd $build_path_ansible \
&& ansible-playbook -i inventory generic-rds-deployment.yml
wait $thread13
cd $build_path_ansible \
&& ansible-playbook -i inventory infra-rdcb-certificates.yml
# thread17
cd $build_path_ansible \
&& ansible-playbook -i inventory final-infra-dh-guac-connection-lists.yml --tags "windows_rdcb_rdp,windows_rdcb_ssh,windows_rdsh_rdp,windows_rdsh_ssh" &
thread17=$!
# thread18
cd $build_path_ansible \
&& ansible-playbook -i inventory final-local-doc.yml &
thread18=$!
# thread19
cd $build_path_ansible \
&& ansible-playbook -i inventory infra-windows-international.yml &
thread19=$!
# thread20
cd $build_path_ansible \
&& ansible-playbook -i inventory final-windows-doc.yml &
thread20=$!
wait $thread17
wait $thread18
wait $thread19
wait $thread20