+ yum install -y unzip xz git git-review perl-XML-XPath
+
+ # facter is not installed by default on the base image and facter package
+ # gets removed when puppet4 is updated. To fix this use version of facter
+ # shipped with puppet4.
+ yum install -y facter
+
+ # ensure facter is available in $PATH avoid failures in retry loop
+ export PATH="/opt/puppetlabs/bin/:$PATH"
+
+ # Install puppet4
+ rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
+ yum -y install -y puppet-agent
+
+ # Create symlink for facter and puppet
+ ln -sf /opt/puppetlabs/bin/facter /usr/bin/facter
+ ln -sf /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet