In my current scheme, I export the git repository, grab the puppet subdirectory 
from the export, and move it to /etc/puppet_hash.  I put it there instead of 
/etc/puppet because I only want to update the files if there is a new commit.  
To check this, I need to store the hash of the HEAD of the exported code 
somewhere.  Instead of writing that information to a separate file, I stick it 
into the filename of the puppet config.


Charles

> On Mar 12, 2015, at 7:35 PM, hubert depesz lubaczewski <dep...@gmail.com> 
> wrote:
> 
> Sure. I wasn't talking about what's in /var/lib/git.
> 
> In your approach there is bare in /var/lib/git/server, and checkout/clone in 
> /etc/puppet_HASH.
> The situation I was asking about is where there is still bare in 
> /var/lib/git/server (or wherever I will decide to put it), and checkout/clone 
> in /etc/puppet
> 
> Since you are symlinking /etc/puppet to /etc/puppet_HASH the effect is the 
> same, and content of the directory is the same.
> 
> Unless I am seriously missing something.
> 
> depesz
> 
> 
> On Thu, Mar 12, 2015 at 11:09 PM, Charles Yeomans <char...@dakim.com> wrote:
> No; there would be two repositories on the server.  The repository in 
> /var/lib/git is bare; recall that a bare git repository does not have a 
> working copy.   It would be possible to make the server repository non-bare, 
> but that's generally a bad idea.
> 
> 
> Charles
> 
> 
> > On Mar 12, 2015, at 3:35 PM, hubert depesz lubaczewski <dep...@gmail.com> 
> > wrote:
> >
> > Why more disk space use? There would still be one clone of the repo, it 
> > just would be located in different place (not /etc/puppet_HASH, but 
> > directly /etc/puppet).
> >
> > I think i can see one benefit of doing it the way you did it - we have 
> > guarantee that there will be no things in /etc/puppet that were added 
> > without adding them to git repo. Which is a good thing, I guess.
> >
> > Thanks,
> >
> > depesz
> >
> > On Thu, Mar 12, 2015 at 8:12 PM, Charles Yeomans <char...@dakim.com> wrote:
> > If I understand your question, the reason I don't just export to 
> > /etc/puppet is that the git repository contains files other than the puppet 
> > configuration, and I prefer to keep those files out of the puppet directory.
> >
> > Certainly one could clone the bare repository in /var/lib/git, and symlink 
> > /etc/puppet to the puppet directory in that non-bare repository.  Then the 
> > script that executes puppet apply would first run git pull, then puppet 
> > apply.  I didn't do it that way for no reason other than I didn't think to 
> > do it that way.  In fact it might be less complicated to implement, in 
> > exchange for some more disk space.
> >
> >
> > Charles
> >
> > > On Mar 12, 2015, at 10:42 AM, hubert depesz lubaczewski 
> > > <dep...@gmail.com> wrote:
> > >
> > > I understand most of it, but why checkout as /etc/puppet_hash, and and 
> > > not simply as /etc/puppet, and just `git pull` when necessary?
> > >
> > > I.e. What is the benefit of having to do clone from scratch on every run 
> > > (i.e. when something has changed)?
> > >
> > > depesz
> > > ​
> 
> --
> You received this message because you are subscribed to a topic in the Google 
> Groups "Puppet Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/puppet-users/GA4KHIebUc4/unsubscribe.
> To unsubscribe from this group and all its topics, 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/29040E55-23D7-46DA-9FA0-6C7163695842%40dakim.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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/CAKrjmhd00rWHZjUbMidyhDwv8hSabuTJUmAN_Q6oeT%3DtSqJa9g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/E8C4AC83-DC81-405D-AB7A-9B361F2FF801%40dakim.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to