2010-09-15 16:51, R.I.Pienaar wrote:

> ----- "Thomas Bellman" <bell...@nsc.liu.se> wrote:
> 
>>     define pkg($app) {
>>         $version = extlookup("pkg_${name}_${app}", "present")
>>         package { $name: ensure => $version; }
>>     }
>>
>>     class app1 {
>>         pkg { "needed-package": app => "app1"; }  # Needs version
>> 10.17
>>     }
>>     class app2 {
>>         pkg { "needed-package": app => "app2"; }  # Needs version
>> 10.17
>>     }
>>     class app3 {
>>         pkg { "needed-package": app => "app3"; }  # Needs version
>> 10.23
>>     }
> 
> no, you just write pkg{"needed-package": } once, and then configure
> extlookup to give different hosts different versions.

Ah, I understand.

But then you instead need to maintain the mapping between which apps
are installed on which nodes in two places: your manifest files, where
you write include statements, and the extlookup data file.  I'm not
Marc, so I don't know his exact circumstances, but to me it sounds messy
and not very maintainable.  Unless you generate both from a common
data source...  (And for this purpose, an external nodes tool would
probably count as "generating" the manifest.)


        /Bellman

-- 
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.

Reply via email to