Last active
January 20, 2018 13:23
-
-
Save narkisr/6097786 to your computer and use it in GitHub Desktop.
Puppet prerequisite script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux | |
if ! [ $(getent group puppet) ] | |
then | |
groupadd puppet | |
fi | |
if [ -f /etc/debian_version ]; | |
then | |
apt-get install git ruby-dev ruby ruby-safe-yaml build-essential -y | |
fi | |
if cat /proc/version | grep Red | |
then | |
yum install git ruby.x86_64 ruby-devel.x86_64 rubygems.noarch gcc gcc-c++ make openssl-devel -y | |
fi | |
if cat /var/run/dmesg.boot | grep FreeBSD | |
then | |
pkg install -y ruby ruby20-gems | |
mkdir /var/lib/ | |
fi | |
gem install json_pure -v 1.8.6 | |
gem install puppet --no-ri --no-rdoc --version '= 4.10.8' | |
gem install ruby-shadow --no-ri --no-rdoc --version '= 2.5.0' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment