On Jul 1, 2010, at 10:45 PM, Douglas Garstang wrote: > On Thu, Jul 1, 2010 at 9:11 PM, Patrick Mohr <kc7...@gmail.com> wrote: >> >> 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.) > > Eeeek! What are the exceptions?
First, if you set a require on the resource using "=>" it overrides the global. Use "+>" to add a require. I also remember hearing something about overriding resources using inheritance, but I don't remember that. Second, I assume, but I'm not sure, that declaring two dependencies like the example below, overrides instead of stacking, but I'm not sure. site.pp Package { require => Exec["global-package-setup"] } node 'test-node' { include install-stuff-class } class install-stuff-class { Package { require => Exec["extra-package-setup"] } package { firefox: ensure => present } } In this example, I don't know if both execs are guaranteed to run before firefox is installed. -- 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.