- From: Joshua Timberman <
>
- To:
- Subject: [chef] Re: LWRP with resources: was Re: Re: Re: Re: Re: param[:name] bizarreness when nesting defines
- Date: Thu, 20 Jan 2011 20:32:35 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jan 20, 2011, at 5:38 PM, Brian Akins wrote:
>
So, if I wanted this service to be able to notify others ( by calling
>
new_resource.updated_by_last_action(true), right?) how could I know if the
>
directory, for example, got created, so I'd want to pass that notify up?
>
Asked another way: how do I pass along the updated status of the underlying
>
resources if I use them in an LWRP.
They're just resources, so they can be accessed like any others through a
notification handler. You'd need to use subscribes.
daemontools_service "my_service" do
directory "/etc/service/my_service"
end
file "/tmp/i_got_updated_by_a_directory" do
subscribes :create, "directory[/etc/service/my_service]"
end
However, I probably wouldn't do that, and instead notify/subscribe the LWRP
resource.
- --
Opscode, Inc
Joshua Timberman, Technical Evangelist
IRC, Skype, Twitter, Github: jtimberman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
iEYEARECAAYFAk04/lMACgkQO97WSdVpzT3VwQCgjpka6nIz8ddjE8NV0JhmNqg9
Jh4An0NRyvkFV1QkqjBg9+D1GakE0suC
=aYT/
-----END PGP SIGNATURE-----
Archive powered by MHonArc 2.6.16.