Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-28 Thread Len Rugen
Look at the creates => option, I use that to drop an initial /etc/my.cnf, but then it can be modified and not regressed by puppet. On Mon, Apr 28, 2014 at 3:41 AM, Paul Tötterman wrote: > For files in user's home directories I would manage the skeleton files >> using puppet and then when the use

Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-28 Thread Paul Tötterman
> > For files in user's home directories I would manage the skeleton files > using puppet and then when the user account is created they'll be copied > into their home directory. That obviously only works for new users though. > It won't account for existing users or for updating the file if it

Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-25 Thread Kenton Brede
If the end game is allowing users to add to a Puppet controlled file, perhaps you can use concat, similar to the "class motd" example on this page: https://github.com/puppetlabs/puppetlabs-concat Kent On Thu, Apr 24, 2014 at 8:33 AM, Paul Tötterman wrote: > Hi, > > I'm managing workstations u

Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-24 Thread José Luis Ledesma
Indeed i missed it. Perhaps you can have some custom fact that returns the md5 of the files, so you can detect if it matches the replacemd5. Probably will make the manifest simpler. Regards, El 24/04/2014 19:21, "Matthias Saou" escribió: > On Thu, 24 Apr 2014 18:41:05 +0200 > José Luis Ledesma

Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-24 Thread Matthew Burgess
On 24 Apr 2014 18:21, "Matthias Saou" wrote: > > On Thu, 24 Apr 2014 18:41:05 +0200 > José Luis Ledesma wrote: > > > Idk if i did understand correctly, but there is the replace parameter > > in the file resource that may help here. > > I think you've missed the important bit, like I did initially

Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-24 Thread Matthias Saou
On Thu, 24 Apr 2014 18:41:05 +0200 José Luis Ledesma wrote: > Idk if i did understand correctly, but there is the replace parameter > in the file resource that may help here. I think you've missed the important bit, like I did initially : The "replace" parameter set to false will have puppet *ne

Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-24 Thread José Luis Ledesma
Idk if i did understand correctly, but there is the replace parameter in the file resource that may help here. Regards El 24/04/2014 15:33, "Paul Tötterman" escribió: > Hi, > > I'm managing workstations using puppet, and I was wondering if there's a > better way to do this: > > $dir = inline_tem

[Puppet Users] A file managed by puppet that is left alone if customized

2014-04-24 Thread Paul Tötterman
Hi, I'm managing workstations using puppet, and I was wondering if there's a better way to do this: $dir = inline_template('<%=ENV["HOME"]%>') define customizable_file($source=undef,$template=undef,$replacemd5='') { > $tmplname = $template ? { > undef => "$name.common", >