My current solution is to have the post-receive hook put the pushed branch
to /var/staging/environments and then have a cron job run every minute or
so that rsyncs all of the environments (except for production, which will
have to be synced manually) to /etc/puppetlabs/puppet/environments and
manage the permissions (chown, chmod) with rsync as well.
It would be nicer to be able to do the rsync whenever a git push is done,
but the mechanics of that are more complicated and a project for a later
date.
Any thoughts?
--Alex
On Tuesday, October 29, 2013 12:40:11 PM UTC-7, Alex Scoble wrote:
Hi All,
I'm trying to use gitolite to control who has access to our puppet code in
git and running into problems with the Puppet Labs semi-official
post-receive hook
https://github.com/adrienthebo/puppet-git-hooks/blob/master/post-receive/dynamic-environments
I have gitolite working to where I can do all of the usual git commands on
my repos, but the post-receive hook isn't working.
I get the following errors when doing a push:
remote: /usr/lib/ruby/1.8/fileutils.rb:1231:in `chown': Operation not
permitted
- /etc/puppetlabs/puppet/environments/hieratest (Errno::EPERM)
remote: from /usr/lib/ruby/1.8/fileutils.rb:1231:in `chown'
remote: from /usr/lib/ruby/1.8/fileutils.rb:967:in `chown_R'
remote: from /usr/lib/ruby/1.8/fileutils.rb:1331:in `traverse'
remote: from /usr/lib/ruby/1.8/fileutils.rb:965:in `chown_R'
remote: from /usr/lib/ruby/1.8/fileutils.rb:964:in `each'
remote: from /usr/lib/ruby/1.8/fileutils.rb:964:in `chown_R'
remote: from hooks/post-receive:95
remote: from hooks/post-receive:39:in `each_line'
remote: from hooks/post-receive:39
Does anyone have any ideas on how I can get the post-receive hook to work?
Otherwise we won't be able to use gitolite and that would be a shame.
Regards,
Alex
--
You received this message because you are subscribed to the Google Groups
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/7d6470ad-c1cb-4676-af32-9376039e0a5e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.