Thank Seth for point that information out. I was able to get OS detection working with the information you provided.
However, I think there are other parts to this conversation to discuss. For example, the ability to have a chef_handler for a failing test could allow one to notify or perform subsequent automated actions based on this event. I am not sure if that is a feature already on the roadmap for Audit mode, but I am interested in find out and providing feedback where possible.
-Ryan H. From: Seth Thomas <
>
Sent: Tuesday, June 9, 2015 6:14 PM To: Ryan Hass Cc: Subject: Re: [chef-dev] Chef DSL Helpers for Audit-Mode Ryan,
Audit mode utilizes ServerSpec, which in turn is a "dialect" of Rspec so using Chef references like `platform` or`platform_family` will not work. You should be able to use `host_inventory['platform']` according to the current ServerSpec docs though in
my own ServerSpec recipes I've also been able to use calls like `if %w(freebsd).include?(os[:family])`. I've not spent a lot of time with Audit Mode myself but as it's ServerSpec, one of the two should work for you.
Cheers,
Seth Thomas
Chef
On Tue, Jun 9, 2015 at 3:54 PM, Ryan Hass
<
" target="_blank" title="mailto:
Ctrl+Click or tap to follow the link">
> wrote:
|
Archive powered by MHonArc 2.6.16.