- From: David Chait <
>
- To:
- Subject: [chef] Re: Re: Node or Role Attribute reference via Chef::Resource::Script::Bash
- Date: Fri, 30 May 2014 15:36:55 -0700
Thanks Julian,
I was over thinking the problem and ended up with something far
less elegant. I appreciate the help.
Cheers,
David
On Fri, May 30, 2014 at 3:23 PM, Julian C. Dunn
<
>
wrote:
>
Sure, does something like this not work?
>
>
$ chef-apply -s
>
execute 'echo hi' do
>
only_if { node['hostname'] == 'foobar' }
>
end
>
Recipe: (chef-apply cookbook)::(chef-apply recipe)
>
* execute[echo hi] action run (skipped due to only_if)
>
>
>
- Julian
>
>
On Fri, May 30, 2014 at 3:24 PM, David Chait
>
<
>
>
wrote:
>
> All,
>
> I apologize if this is a rather basic question, but I cannot seem
>
> to find a clear answer. I am trying to pull a node or role based
>
> attribute into only_if or not_if logic within a Bash block, though so
>
> far without a lot of luck. A> Is it possible? B> If so, how?
>
>
>
> Thanks,
>
> David
>
>
>
>
--
>
[ Julian C. Dunn
>
<
>
>
* 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 ]
Archive powered by MHonArc 2.6.16.