-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·32 lines (23 loc) · 993 Bytes
/
install.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
#!/bin/bash
echo "-------------------------------------------------------"
echo "INSTALLING HeatingControl 3 via Ansible on Raspberry Pi"
echo "
-------------------------------------------------------"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ansible|grep "install ok installed")
echo Checking for ansible: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "No ansible installed. Setting up ansible."
sudo apt-get --force-yes --yes install ansible
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' cowsay|grep "install ok installed")
echo Checking for cowsay: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "No cowsay installed. Setting up cowsay."
sudo apt-get --force-yes --yes install cowsay
fi
## Insert this with your credentials in your.profile
## Do this if you want do build your own HeatingControl Version
#export DOCKERHUB_USERNAME="Billy Idol"
#export DOCKERHUB_PASSWORD="whiteWedding"
cowsay "Starting Ansible Playbook"
ansible-playbook $1 install_hc3.yml -i hosts