Issue #19556 has been updated by Rob Nelson.

Status changed from Unreviewed to Closed

In addition to using anchors, you could put the packages in another class, 
something like module::install::deps, and "require => module::install::deps" 
wherever you need it.

----------------------------------------
Feature #19556: Meta resource type as a container for multiple resource types
https://projects.puppetlabs.com/issues/19556#change-98292

* Author: Gerard Hickey
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: RAL
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
One of the things that seems would be useful is a way to reference a number of 
resource types with a single entry. 

For example lets say that there are 6 packages (no direct dependancies between 
them) that need to be installed  before the configuration files can be build 
and a service started. Traditionally this would be accomplished with something 
like

     file {'/etc/abcd.conf':
         ensure  => present,
         .....
         require  => [Package['pack1'], Package['pack2'],....,Package['pack6']],
      }

If the require construct needs to be specified a couple of places in the class 
(or even outside the class), then it can be problematic to keep all references 
up to date and correct. 

What I would like to propose is a Meta type that is just a collection of 
resources. So the something like the following is what I am envisioning:

      meta {'my_collection':
          require   => [Package['pack1'], 
Package['pack2'],....,Package['pack6']],
      }
       
      file {'/etc/abcd.conf':
         ensure  => present,
         .....
         require  => Meta['my_collection'],
      }

It would also be nice if the Meta type would also support things like notify so 
that if all the resource requirements are satisfied, the it would fire off the 
notification to schedule the notified resource. 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to