+ FACTER_OSVER=$(/usr/bin/facter operatingsystemrelease)
+ case "$FACTER_OSVER" in
+ 14.04)
+ apt-get install openjdk-7-jdk
+ # make jdk8 available
+ add-apt-repository -y ppa:openjdk-r/ppa
+ apt-get update
+ # We need to force openjdk-8-jdk to install
+ apt-get install openjdk-8-jdk
+ # make sure that we still default to openjdk 7
+ update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
+ update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
+
+ # disable auto-update service?
+ if [ -f /etc/cron.daily/apt ]
+ then
+ rm -rf /etc/cron.daily/apt
+ fi
+ ;;
+ 16.04)
+ apt-get install openjdk-8-jdk
+
+ # force auto-update services off and mask them so they can't
+ # be started
+ for i in apt-daily{service,timer}
+ do
+ systemctl disable ${i}
+ systemctl mask ${i}
+ done
+ ;;
+ *)
+ echo "---> Unknown Ubuntu version $FACTER_OSVER"
+ exit 1
+ ;;
+ esac
+
+