On Wed, Feb 3, 2016 at 7:47 AM, R.I.Pienaar <[email protected]> wrote:

> hello,
>
> I would like to add a metaparameter - which I think is easy now via
> Type.newmetaparam.
>

We haven't been thinking of metaparameters as a general purpose extension
point. This came up once before that I know of, about a year ago, and
there's a little discussion of this in
https://tickets.puppetlabs.com/browse/PUP-4281. The conclusion we reached
at the time was, more or less, to explore whether the desired change could
be accomplished with a puppet function and/or a change to core puppet.


>
> The thing that I can't seem to find any example of though is how to
> make this metaparameter do something on the nodes for all providers
> or all types.


> Imagine there's a metaparam that might describe how to test a resource
> works, something like:
>
>    service{"httpd": validate => "check_http --port 80 -H localhost"}
>
> I'd then want to have some code that would be run on the agent nodes
> for any resource that has this param set.
>

I don't think something like this exists per se, but 'validate' might be
one such example of something worth adding to core puppet. Fwiw, one
resource-specific example added not too long ago is the file type's
validate_cmd:

https://docs.puppetlabs.com/puppet/latest/reference/type.html#file-attribute-validate_cmd
.

Also, I'm guessing you're aware but another tool in the toolbox *might*
include the postrun_command setting (which is *not* per-provider as you
were thinking):

https://docs.puppetlabs.com/puppet/latest/reference/configuration.html#postruncommand

More broadly, there has been some discussion on a few threads and tickets
about making the agent lifecycle provide some more useful hooks, so I'd
love to hear more ideas about how to improve this.

Thanks!
Kylo


> Does anyone have any hints or know of an example of this?
>
> thanks
>
> ---
> R.I.Pienaar
>
> --
> 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/70254077.345165.1454514435921.JavaMail.zimbra%40devco.net
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kylo Ginsberg | [email protected] | irc: kylo | twitter: @kylog

-- 
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/CALsUZFHniTYyYU0ThP-Jk37f6QXroJ0P0-K0PkbRPXMsdB6v0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to