Making a recipe run last


#1

Hi! I have a motd recipe that updates /etc/motd with the data-time of the
run. I would like this to run last, and only if the rest of the run was
successful . . . is this possible?

Google searches turned up nothing, but maybe I’m not searching for the
right thing?

Thanks!!

Guy


#2

You could write a report handler:

http://docs.opscode.com/essentials_handlers.html

  • Julian

On Tue, Nov 26, 2013 at 10:07 AM, Guy Matz guymatz@gmail.com wrote:

Hi! I have a motd recipe that updates /etc/motd with the data-time of the
run. I would like this to run last, and only if the rest of the run was
successful . . . is this possible?

Google searches turned up nothing, but maybe I’m not searching for the right
thing?

Thanks!!

Guy


[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


#3

As Julian said, a report handler would be the way to go. Check out https://github.com/SimpleFinance/chef-handler-motd

Another approach is to have the resource with an action of :nothing and have another resource do :delayed notification… https://gist.github.com/nvwls/7672039

Joe

On Nov 26, 2013, at 7:07 AM, Guy Matz guymatz@gmail.com wrote:

Hi! I have a motd recipe that updates /etc/motd with the data-time of the run. I would like this to run last, and only if the rest of the run was successful . . . is this possible?

Google searches turned up nothing, but maybe I’m not searching for the right thing?

Thanks!!

Guy