Skip to content

Instantly share code, notes, and snippets.

@narkisr
Last active January 20, 2018 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save narkisr/6097786 to your computer and use it in GitHub Desktop.
Save narkisr/6097786 to your computer and use it in GitHub Desktop.
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