Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why does r10k sometimes not update Puppetmaster?

I've been using this to update Puppetmaster with new puppetcode from my git repo:

opt/puppet/bin/r10k deploy environment <branchname> -p --verbose

Well I found that sometimes changes from <branchname> are not reflected.

So I've written this simple little r10k update script /usr/local/bin/r10ku :


if [ $# -eq 0 ]; then
   echo 'Branch name (environment to build) required'
   exit 1

echo "Building $1 ..."

rm -rf /var/cache/r10k/*
rm -rf /etc/puppetlabs/puppet/environments/$1
/opt/puppet/bin/r10k deploy environment $1 -p --verbose

echo "Done."

which I use like so:

r10ku <branchname>

Now I find that even still, if I change the name of a template, my puppet agent -t breaks looking for the old name of the now nonexistent template. I've found the only way to workaround is to commit <branchname> as <branchname2> and then build and test <branchame2>.

I'm wondering if there is something I am missing or if this is a bug?