On Friday, August 24, 2012 4:38:54 PM UTC-4, lamour wrote:
>
>
> On Wednesday, August 22, 2012 5:06:41 PM UTC-4, Ramin K wrote:
>>
>>  
>>
> node 'some.node.my.domain.com inherits basenode { 
>>    include mysql 
>>    include general_devel 
>>    realize Package['mysql-client'] 
>> } 
>>
>> node basenode { 
>>    include sudo 
>>    include vpackage 
>>
>>    # realize all packages with this tag 
>>    Package<| tag = 'utils' |> 
>> } 
>>
>> class vpackage { 
>>
>>    # packages with tag => util get realized on all systems 
>>    @package { 'curl':    tag => 'utils',} 
>>    @package { 'htop':    tag => 'utils',} 
>>    @package { 'lynx':    tag => 'utils',} 
>>    @package { 'screen':  tag => 'utils',} 
>>    @package { 'strace':  tag => 'utils',} 
>>    @package { 'tcpdump': tag => 'utils',} 
>>    @package { 'wget':    tag => 'utils',} 
>>    @package { 'whois':   tag => 'utils', name => 
>> $vpackages::params::whois, } 
>>
>>    @package { 'mysql-client': name => $vpackages::params::mysqlclient, } 
>> } 
>>
>
> Exactly!  I want to build classes to be used as building blocks.  I don't
> want to have to deal with unexpected package collisions between two
> classes because the authors of the two classes didn't know the package
> was being used by the other.  That's ultimately where this discussion came
> from.  If a package needs a whole class wrapped around it, it should get 
> one,
> but if it "just needs to be present", then it shouldn't be required, IMHO.
>

sigh.  my page timed out while I was editing this, and I ended up having to 
cut and paste
the whole thing back together, and I (obviously) pasted the wrong paragraph 
here.  This
is the correct one:

This example is awesome!  I tried out something similar in my test
environment, and it works great.  My major issue with doing it this way
is that it means that I can't see from the class which packages it's
requiring, but it's still pretty nice that I only have to maintain one list
of packages.  Also, it opens up a single point of failure for "all" classes,
if someone screws up this file.  We may eventually go to something like
this and just wrap the editing of this file in a perl script with lots of 
error
checking.  lol


sorry for the confusion,
Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/zPPHvsvSy8AJ.
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.

Reply via email to