--On Friday, November 07, 2014 06:39:41 PM +0100 Felix Frank
<felix.fr...@alumni.tu-berlin.de> wrote:
On 11/07/2014 03:40 PM, jcbollinger wrote:
If you need to support multiple some::fun_instances, with some but not
all sharing any given $sname (i.e. a many to many relationship), then
you're going to need to make deeper changes.
The more I think about what I implemented the less I like it. The goal
had been to allow the pattern:
fragment{'one': ensure => present}
fragment{'two': ensure => present}
But I will need to change the pattern to:
setup:{'server': ensure => present}
fragment{'one': ensure => present}
fragment{'two': ensure => present}
Yeah.
FWIW, this is the one use case that worries me most when thinking about
patterns to eliminate the defined() horror.
define something::specific($group) {
file { "/things/$group/$name": }
if !defined( File["/things/$group"] ) {
file { "/things/$group": ensure => directory }
}
}
Yes, I like that. Let me know when I can use it. ;-)
I.e., a defined type of which some but not all instances depend on a
shared resource. Constraints could ensure a consistent catalog, but how
can the dependency be automatically satisfied without defined() or
ensure_resource()?
I'm toying with ideas for allowing multiple declarations of the same
resource. That will pose other exiting issues, but might be the least
painful way.
Sorry for derailing, I just wanted to note that here ere I forget.
Not a problem. Thanks for thinking about it.
Bill
--
Bill MacAllister
System Programmer, Stanford University
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/D5444CD52C24DE8E722FEE8B%40trainmaster.stanford.edu.
For more options, visit https://groups.google.com/d/optout.