First things I'd say:
- make sure to cleanup at the really end (run cleanup.sh after puppet.sh)
yum list <package>
will list all available packages (and installed packages), to know which packages are installed you should run yum list installed
(you might have an issue in your repos or mirrors if you do not get any output at all from your command)
as you installed from rpm, you can also run rpm -qa | grep puppet
to find out if the package has been installed, you should get something like (depending the version)
[vagrant@vagrant ~]$ rpm -qa | grep puppet
puppetlabs-release-6-11.noarch
From a quick view, the script looks good - I do install from the following script
install_puppet()
{
echo "==> Installing Puppet"
REDHAT_MAJOR_VERSION=$(egrep -Eo 'release ([0-9][0-9.]*)' /etc/redhat-release | cut -f2 -d' ' | cut -f1 -d.)
echo "==> Installing Puppet Labs repositories"
rpm -ipv "http://yum.puppetlabs.com/puppetlabs-release-el-${REDHAT_MAJOR_VERSION}.noarch.rpm"
if [[ ${CM_VERSION:-} == 'latest' ]]; then
echo "==> Installing latest Puppet version"
yum -y install puppet
else
echo "==> Installing Puppet version ${CM_VERSION}"
yum -y install "puppet-${CM_VERSION}"
fi
}
so it does basically the same -
Update
Its very strange, I created a box from your gist and the box was okay - puppet was installed.
I only changed from puppet.sh
#!/bin/sh
#rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
yum -y install puppet
so I was able to install puppet 3.x rather than puppet 4.x - and I used an existing Vagrantfile with simple provisioning and all was ok
When I vagrant up the VM, provisioning for puppet was running and packaged installed.