On Thursday, April 23, 2015 at 5:44:37 AM UTC-5, Arnau wrote: > > Hello all, > > we had some NFS mounts in /nfs/mount1. Then we created a link > from /nfs/mount1 to /mount1. Both resources were defined using puppet > (mount and file). As the mounts were defined in fstab, the file > resource was applied every time with no problem (it ensured that the > link was created). > > Now we have moved from fstab mounts to automount, and now the file > resource that creates the link triggers an automatic mount everytime > puppet runs (not desired). > > A part from creating those links in an exec, anyone has a better idea on > how to manage this somehow more elegant? > >
Puppet needs to gather information about the managed file (symlink) on every run. I don't see why this would need to involve the link *target* being stat()ed, but if it does, and if the target path is on an autofs file system, then that will trigger a mount. It *shouldn't* make a difference to set links => 'manage' on the File resource, as that pertains to recursive operations, but you could give it a shot. Otherwise, I don't see how this issue could be worked around at the DSL level without abandoning use of a File resource to manage the symlink. It may be that Puppet itself could be fixed to avoid the behavior you observe, but that's a whole different story. John -- 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/0c8d98ee-310c-4256-9591-1657580b2f5d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.