*sigh*
Well, it kind of does, but please, please don't.
This goblin crops up each couple of years here again. I suppose it
will continue to do so until we find a way to put the defined()
function to rest. I.e., remove it from the language.
John produced some good writeups on the list back in '12.
https://groups.google.com/d/msg/puppet-users/Fvl0aOe4RPE/-k60j2QSID0J
We have made some progress since then, in the form of a module.
https://forge.puppetlabs.com/ffrank/constraints
It allows you to design a clean and non-ambiguous, if somewhat less
convenient manifest. We're not sure whether this will suffice to
deprecate the defined function (it may have other uses, after all),
and perhaps it'll stay until real duplication is possible. As I
wrote earlier, that will be a while.
A better workaround with the current toolset are indeed virtual
resources, as Peter stated, or wrapping the problematic resource in
a class, if that is feasible.
Regards,
Felix