Skip to content

Instantly share code, notes, and snippets.

@narkisr
Last active Jan 20, 2018
Embed
What would you like to do?
Puppet prerequisite script
#!/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