On 2014-17-10 19:29, Vladimir Brik wrote:
Hello,
Is it possible to override parameters of a class using a collector?
(similarly to
https://docs.puppetlabs.com/puppet/latest/reference/lang_resources.html#amending-attributes-with-a-collector)
No, that does not work. In 4.0 you will get a specific error like this:
"Error while evaluating a Virtual Query, Classes cannot be collected"
It is not allowed by design, but in earlier versions than 3.7 with
--parser future the error message is really bad.
The following gives "Resource type cls doesn't exist" error:
class cls($arg="default"){notify{$arg:}}
node foo
{
Cls <| |> {arg => "override"}
class{'cls':}
}
It works if I change "class" to "define" though.
Yes, that is allowed.
- henrik
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
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/m1s8et%24kov%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.