mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
use case for os.localvars
This commit is contained in:
parent
d66b56824d
commit
132813c4be
1 changed files with 27 additions and 8 deletions
35
runansible
35
runansible
|
@ -8,13 +8,32 @@ fi
|
||||||
|
|
||||||
# if vars/local_vars.yml is missing, put a default one in place
|
# if vars/local_vars.yml is missing, put a default one in place
|
||||||
if [ ! -f ./vars/local_vars.yml ]; then
|
if [ ! -f ./vars/local_vars.yml ]; then
|
||||||
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
||||||
OS=${OS//\"/}
|
OS=${OS//\"/}
|
||||||
if [ "$OS" = "centos" ]; then
|
|
||||||
cp ./vars/centos.localvars ./vars/local_vars.yml
|
case $OS in
|
||||||
else
|
OLPC)
|
||||||
cp ./vars/debian.localvars ./vars/local_vars.yml
|
cp ./vars/olpc.localvars ./vars/local_vars.yml
|
||||||
fi
|
fedora)
|
||||||
|
cp ./vars/olpc.localvars ./vars/local_vars.yml
|
||||||
|
;;
|
||||||
|
centos)
|
||||||
|
cp ./vars/centos.localvars ./vars/local_vars.yml
|
||||||
|
;;
|
||||||
|
debian)
|
||||||
|
cp ./vars/debian.localvars ./vars/local_vars.yml
|
||||||
|
;;
|
||||||
|
ubuntu)
|
||||||
|
cp ./vars/debian.localvars ./vars/local_vars.yml
|
||||||
|
;;
|
||||||
|
raspbian)
|
||||||
|
cp ./vars/debian.localvars ./vars/local_vars.yml
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown OS -- no matching os.localvars -- exiting now..."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/iiab/iiab.env ]
|
if [ -f /etc/iiab/iiab.env ]
|
||||||
|
@ -27,7 +46,7 @@ fi
|
||||||
|
|
||||||
if [ ! -f iiab.yml ]
|
if [ ! -f iiab.yml ]
|
||||||
then
|
then
|
||||||
echo "XSCE Playbook not found."
|
echo "IIAB Playbook not found."
|
||||||
echo "Please run this command from the top level of the git repo."
|
echo "Please run this command from the top level of the git repo."
|
||||||
echo "Exiting."
|
echo "Exiting."
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Add table
Reference in a new issue