On 2014-29-09 7:44, smartway wrote:
A optional attribute of a resource defaults to a value which is not
supported
on one of the platforms.
If it defaults to an illegal value via the Resource Defaults mechanism,
it will be difficult to look it up.
I want add a platform check to block the attribute, if the attribute is
given by user throw a error.
Type file for this resource is present in other module which i cannot
modify.
Is there a way to know if the attribute in present in manifest file and
add a check for same in
my module.
The order of evaluation makes this difficult. You can perhaps use a
collect expression with an override to set value to something else.
Making it fail in this case is more difficult, something crazy like
evaluating faulty overrides may work - e.g.
thetype <| theparam == unwanted_value |> {
bad_use_of_the_param => 'stop'
}
(untried, it may fail even if the query does not return any resources).
- henrik
--
You received this message because you are subscribed to the Google
Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/c1bba88b-1e0c-4b4b-bdf6-a75a0f2124fb%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-dev/c1bba88b-1e0c-4b4b-bdf6-a75a0f2124fb%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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
Developers" 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-dev/m0bs6n%24qkp%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.