On Tue, Feb 15, 2011 at 17:11, Gabriel Filion <lelu...@gmail.com> wrote: > On 11-02-15 05:25 PM, Nan Liu wrote: >> You can also create class level dependency so it is less tightly >> coupled to a specific resource which may benefit you in the long run >> should you need to refactor dns_config class. >> >> class random_app { >> require dns_config >> ... >> } > > hmm this actually binds the OP's 'random_app' module to the 'dns_config' > one while Daniel's suggestion can find the File resource even though it > is moved from one module to another.
For what it is worth, for an extremely well known interface like /etc/resolv.conf I would subscribe to the file resource, but for most cases I prefer to depend on the class. So, I think both answers are right, and I didn't explain why I chose the apparently tighter binding this time around. Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <dan...@puppetlabs.com> ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.