forked from KirioXX/AppDepInstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.sh
executable file
·37 lines (31 loc) · 858 Bytes
/
main.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
#!/bin/bash
function fetchConfig {
git clone https://github.com/KirioXX/AppDepInstaller.git ./config > /dev/null 2>&1
}
function installAnsible {
curl -L https://github.com/ownport/portable-ansible/releases/download/v0.4.2/portable-ansible-v0.4.2-py3.tar.bz2 | tar -xz
for l in config console doc galaxy inventory playbook pull vault;do
ln -s ansible ansible-$l
done
python3 ansible localhost -m ping
}
function cleanUp {
rm -rf ./ansible*
rm -rf ./config
}
function installRequirements {
python3 ansible-galaxy install -r ./config/requirements.yml
}
function installDependencies {
python3 ansible-playbook ./config/main.yml -K
}
if command -v python3 &> /dev/null
then
fetchConfig
installAnsible
installRequirements
installDependencies
cleanUp
else
echo "Please install python 3"
fi