Created
December 16, 2014 23:38
-
-
Save rchrd2/365760241dd59a132d59 to your computer and use it in GitHub Desktop.
install_puppet_modules.sh
This file contains hidden or 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
#!/bin/bash | |
# This is a little script that will install the required puppet modules. | |
# It was written to help setup vagrant. It is called as a provision script. | |
# | |
# # This installs the modules | |
# config.vm.provision :shell do |shell| | |
# shell.path = "./puppet/install_puppet_modules.sh" | |
# end | |
# | |
# It's only needed on the puppet-master, not the puppet-agents. | |
# It is also needed on the vagrant box. | |
# | |
# @author http://github.com/rchrd2 | |
echo "Installing puppet modules..." | |
target_dir=/etc/puppet/modules/ | |
mkdir -p $target_dir | |
array=( | |
"ajcrowe-supervisord --version=0.5.0" | |
"darin-zypprepo --version=1.0.1" | |
"elasticsearch-elasticsearch --version=0.3.2" | |
"inkblot-github --version=1.0.0" | |
"jfryman-nginx --version=0.0.9" | |
"jhoblitt-ganglia --version=1.3.0" | |
"maestrodev-wget --version=1.4.1" | |
"pdxcat-nrpe --version=1.0.0" | |
"petems-swap_file --version=0.1.2" | |
"puppetlabs-apache --version=1.0.1" | |
"puppetlabs-apt --version=1.4.2" | |
"puppetlabs-concat --version=1.1.0" | |
"puppetlabs-firewall --version=1.1.1" | |
"puppetlabs-gcc --version=0.1.0" | |
"puppetlabs-git --version=0.0.3" | |
"puppetlabs-inifile --version=1.1.0" | |
"puppetlabs-java --version=1.1.2" | |
"puppetlabs-postgresql --version=3.4.2" | |
"puppetlabs-puppetdb --version=3.0.1" | |
"puppetlabs-stdlib --version=4.4.0" | |
"puppetlabs-vcsrepo --version=1.0.0" | |
"rtyler-jenkins --version=1.2.0" | |
"saz-memcached --version=2.4.0" | |
"saz-ssh --version=2.3.6" | |
"softek-java7 --version=0.1.0" | |
"stankevich-python --version=1.7.5" | |
"stephenrjohnson-puppet --version=0.0.21" | |
"thomasvandoren-redis --version=0.0.9" | |
"willdurand-nodejs --version=1.8.3" | |
) | |
curernt_module_list=`puppet module list` | |
for i in "${array[@]}" | |
do | |
name="$(echo $i | awk '{print $1}')" | |
(echo $curernt_module_list | grep --quiet $name) || (puppet module install --target-dir=$target_dir $i ) | |
done | |
echo "done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For ruby-impaired, this will do the trick of install puppet modules and their versions without having to install
puppet librarian