On Jul 1, 2010, at 9:05 PM, christopher floess wrote: > Hey, this is sort of hijacking the thread, so if need be, please, I can start > another thread for it, but could someone explain the code from the OP here. I > feel like this is sort of the next step in puppet functionality that I need > to learn (I'm still new). > > I'll start by pointing out three things that tripped me up: > > 1. I've read about the difference between Package (capitalized), and package > (lowercase), but in practice I don't understand it.
When declaring a resource, use the lowercase one. When referring to an existing resource, use the uppercase one. > 2. In the Package { require => Class['yum::client']}, why isn't there a name? This says take care of the whole yum::client class before installing any package. (Technically this is only almost true. There are exceptions.) > 3. 'yum::client' is a reference to a nested class, right? So what are the use > cases for nested classes? I'm wondering if maybe I should/could be taking > advantage of this to clean up my code a bit. Mostly it's just to reduce the amount of classes you have. The same answer applies to the question, "Why do people want sub-folders? Why not just put all folders in the filesystem's root?" > > On 07/01/2010 08:56 PM, Douglas Garstang wrote: >> On Thu, Jul 1, 2010 at 11:22 AM, Dan Carley<dan.car...@gmail.com> wrote: >> >>> On 1 July 2010 00:32, Douglas Garstang<doug.garst...@gmail.com> wrote: >>> >>>> If I have a package { "foo": ensure => installed; require => something >>>> } in a module, AND I also have a Package { require => >>>> Class['yum::client']} in site.pp, what happens in the module? Does the >>>> package in the module require both 'something' and the yum::client >>>> class, or does the fact I specified a package{} with a require in the >>>> module mean that only the yum::client class is required? >>>> >>> The latter will happen. The default will be replaced by the explicit >>> statement in package{"foo"}. You might want to look into plusignment (+>) to >>> do this, but there are some caveats to it's usage. Such as feature #2825. >>> >> Yeah. You sort of have to be careful. I had a Package {} resource >> defined in site.pp, and then in various modules where needed, I had >> more Package defaults. I've only just realised (I must have gotten >> lucky) that the one in site.pp was being skipped because of the local >> modules ones. >> >> Doug >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@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. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.