Skip to content
Snippets Groups Projects
Commit 26d69c2d authored by wonko's avatar wonko
Browse files

added facter facts upload and curl install

parent b6d681c6
No related branches found
No related tags found
No related merge requests found
#!/bin/bash -x
GITPROJ=https://chaos.expert/ccc-ffm/4Refugees-InternetCafe
ATHQ=false
HQSERVER="install.hq"
PROXYURL="http://${HQSERVER}:8080/"
if [ "$1" != "RUNME" ]; then
#pull myself from git repo
......@@ -13,16 +14,19 @@ if [ "$1" != "RUNME" ]; then
fi
#check for install.hq
if ping -c 5 install.hq; then
echo 'Acquire::http::Proxy "http://install.hq:8080/";' > /etc/apt/apt.conf
facter --yaml /tmp/facts.yaml
curl -T /tmp/facts.yaml ftp://install.hq/refugee-notebooks/${HOSTNAME}.yaml
if ping -c 5 ${HQSERVER}; then
ATHQ=true
fi
if [ "$ATHQ" = true ]; then
echo 'Acquire::http::Proxy "${PROXYURL}";' > /etc/apt/apt.conf
else
echo "#no proxy" > /etc/apt/apt.conf
fi
apt update
apt install git puppet vim
apt install git puppet vim curl
apt full-upgrade
......@@ -39,3 +43,8 @@ git submodule init
git submodule update
git pull
puppet apply /etc/puppet/manifests/site.pp
if [ "$ATHQ" = true ]; then
facter --yaml /tmp/facts.yaml
curl -T /tmp/facts.yaml ftp://${HQSERVER}/refugee-notebooks/${HOSTNAME}.yaml
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment