Possible to subscribe to all resources of a specific type?

36 views
Skip to first unread message

Schofield

unread,
Jan 12, 2016, 3:34:32 PM1/12/16
to Puppet Users
Is it possible to subscribe to a specific type?  For example, refresh a resource if any resources of the type 'user' change?  If so what's the syntax?

Trevor Vaughan

unread,
Jan 12, 2016, 8:56:20 PM1/12/16
to puppet...@googlegroups.com
Hi Ben,


User<| |> ~> Resource['my_resource']

*should* work (not tested).

Thanks,

Trevor

On Tue, Jan 12, 2016 at 3:34 PM, Schofield <dbsch...@gmail.com> wrote:
Is it possible to subscribe to a specific type?  For example, refresh a resource if any resources of the type 'user' change?  If so what's the syntax?

--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/89ed3145-96ad-4431-a5a1-f8b09f1e02f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699

-- This account not approved for unencrypted proprietary information --

R.I.Pienaar

unread,
Jan 13, 2016, 2:46:15 AM1/13/16
to puppet-users


----- Original Message -----
> From: "Trevor Vaughan" <tvau...@onyxpoint.com>
> To: "puppet-users" <puppet...@googlegroups.com>
> Sent: Wednesday, January 13, 2016 2:56:07 AM
> Subject: Re: [Puppet Users] Possible to subscribe to all resources of a specific type?

> Hi Ben,
>
> A resource collector should do what you want
> https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html.
>
> User<| |> ~> Resource['my_resource']
>
> *should* work (not tested).

yes, be aware though if you have virtual resources this will also realise those matching
Reply all
Reply to author
Forward
0 new messages