On Wednesday, March 21, 2018 at 8:46:02 AM UTC-5, jcbollinger wrote: > > > > On Wednesday, March 21, 2018 at 4:03:28 AM UTC-5, Martin Alfke wrote: >> >> I prefer the each lambda over ensure_resource and create_resource. >> my 5pc. >> > > In this particular case, the ensure_resource() call is inside a defined > type that is used both internally and externally, so I don't think the > each() function is going to help me. But I think I can probably solve > the problem (as much as I care to do) by overriding parameters of the > defined type instances instead of the objects of ensure_resource(). The > cost of that will be that the defined type needs to expose such parameters > in the first place, which it otherwise would not need to do, and those > parameters will serve an internal purpose rather than an external one. >
... and, silly me, *of course* that doesn't work. Overriding the parameters of the defined type lands too late to affect the resource it (maybe) declares indirectly via ensure_resource() -- which is yet another reason why that function is an evil demon toad, lurking in the shadows and waiting to pounce on you and jump up and down on your head. With nasty, big, pointy teeth. John #evildemontoad -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/72310b5d-29d9-4463-8db2-67e64b9742a9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
