On Mon, Nov 28, 2011 at 04:00:48PM +0000, Dan White wrote: > ----- Bruce Richardson <itsbr...@workshy.org> wrote: > > You realise that this is being done by Unix (Linux?), not Puppet? If > > you use puppet to replace the system's default dotfiles (on Linux, > > they'll be in /etc/skel) *before* creating any users, you'll get > > precisely what you want. Just set up the users so that they depend on > > the file resources which place the right files in /etc/skel and this > > will guarantee the files are in there before the users are created > > (assuming they didn't exist already). The Unix user creation tools > > will copy the /etc/skel files into the right place when Puppet invokes > > them. > > > > This only fails if you need different dotfiles (differing by content > > and/or name) for different users. If you don't, simple win > > > > -- > > Bruce > > > > Hierophant: someone who remembers, when you are on the way down, > > everything you did to them on the way up. > > > > Thanks for responding. > I agree, globally customizing the defaults is one way to go, but I am > shooting for the second option. >
If you do not want the gobal defaults copied why are you using managehome => true? If you really have to go this awkward path you can create a conditional exec resoure that removes the dotfiles if they are equal to the skel files so puppet will copy the correct files again. (fileresources with replace => false) A second solution is to create a custom fact that tells you if puppet should manage the dotfiles and wrap your fileresources in an if-clause (fileresources with replace => true) -Stefan
pgpZ9sDLiClU4.pgp
Description: PGP signature