I recently tried placing a notification on a cookbook_file resource pointing
toward an execute resource. The documentation at
http://docs.opscode.com/chef/resources.html#notifications gives this example:
notifies :run, “execute[test-nagios-config]”, :immediately
I tried using this, but was never able to get it to trigger. I ran across
another example online using this syntax:
notifies :run, resources(:execute => “test-nagios-config”), :immediately
This works like I would expect. Is the example syntax in the documentation
deprecated or am I missing something?
Which version of Chef are you using? There was a minor release awhile back where notifications were broken.
Thanks,
Matt Ray
Senior Technical Evangelist | Opscode Inc.
matt@opscode.com | (512) 731-2218
Twitter, IRC, GitHub: mattray
From: cgowin@branchout.com [cgowin@branchout.com]
Sent: Wednesday, January 30, 2013 6:37 PM
To: chef@lists.opscode.com
Subject: [chef] Problems using notification with execute resource
I recently tried placing a notification on a cookbook_file resource pointing
toward an execute resource. The documentation at
http://docs.opscode.com/chef/resources.html#notifications gives this example:
notifies :run, “execute[test-nagios-config]”, :immediately
I tried using this, but was never able to get it to trigger. I ran across
another example online using this syntax:
notifies :run, resources(:execute => “test-nagios-config”), :immediately
This works like I would expect. Is the example syntax in the documentation
deprecated or am I missing something?
I'm on 10.12.0.
--
Chad
On Wed, Jan 30, 2013 at 5:28 PM, Matt Ray matt@opscode.com wrote:
Which version of Chef are you using? There was a minor release awhile back
where notifications were broken.
Thanks,
Matt Ray
Senior Technical Evangelist | Opscode Inc.
matt@opscode.com | (512) 731-2218
Twitter, IRC, GitHub: mattray
From: cgowin@branchout.com [cgowin@branchout.com]
Sent: Wednesday, January 30, 2013 6:37 PM
To: chef@lists.opscode.com
Subject: [chef] Problems using notification with execute resource
I recently tried placing a notification on a cookbook_file resource
pointing
toward an execute resource. The documentation at
All Infra Resources gives this
example:
notifies :run, "execute[test-nagios-config]", :immediately
I tried using this, but was never able to get it to trigger. I ran across
another example online using this syntax:
notifies :run, resources(:execute => "test-nagios-config"), :immediately
This works like I would expect. Is the example syntax in the documentation
deprecated or am I missing something?