You need virtual resources:
1. Define package A in a virtual way:
@package {
"A" :
ensure => 'present',
}
2. Then realize it wherever needed:
class module2::app2 {
realize(Package["A"])
# your stuff here…
}
Cheers,
Bernd
--
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/-/Q5kdE6TkzGYJ.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
But which is better? Is it just a matter of personal preference?
What advantages one gains?
What does need more resources, performance-wise?
--
Kind Regards, Markus Falb
If you use virtual resources for example and you introduce Debian/Ubuntu
operating systems, you have to go to all your modules that reference
Package[httpd] and introduce logic that installs the Debian equivalent.
On the flip side if you do this in a class, you only have to handle it
in one place.
Using a class for Apache also gives you a place to put common
configuration - maybe in a few months you want every single Apache, no
matter where it is or who runs it, to have mod_status enabled.
--
Luke Bigum
Information Systems
Ph: +44 (0) 20 3192 2520
luke....@lmax.com | http://www.lmax.com
LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN
The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company.
--