Fix puppet install and execution issues

When adding a repository in Ubuntu, one must run apt-get update prior
to trying to install a package from the new repository. Additionally
when this new package installs binaries in an alternative path, you
need to ensure the PATH is properly updated for it to work.

Change-Id: I285baa486221e496baa8e205bd7a92c33d07dd2f
This commit is contained in:
Alex Schultz 2017-05-30 13:51:18 -06:00
parent 9f100646e9
commit dde067b268
2 changed files with 4 additions and 0 deletions

View File

@ -510,6 +510,7 @@
elif [ -f /usr/bin/apt-get ]; then
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb -O /tmp/puppet.deb
sudo dpkg -i /tmp/puppet.deb
sudo apt-get update
sudo apt-get install puppet-agent
rm -rf /tmp/puppet.deb
fi

View File

@ -350,6 +350,9 @@
project: $ZUUL_PROJECT
- shell: |
#!/bin/bash -xe
# NOTE(mwhahaha): puppet from puppet-agent-install builder is not in
# the standard path, so add puppetlabs bin to the path
export PATH=$PATH:/opt/puppetlabs/bin
cd $ZUUL_PROJECT
# try to find the modulename, ex: puppet-aodh
# we have to use sed because workspace is puppet-aodh-branch-tarball