- From: Xabier de Zuazo <
>
- To:
- Subject: [chef] Re: action as array vers string
- Date: Thu, 29 Nov 2012 11:41:53 +0100
Hello Jan,
On Wed, 28 Nov 2012 09:20:31 +0000
Jan Bares
<
>
wrote:
>
I am a bit confused about how I should compare action variable. The
>
action in recipe can be a string or array:
>
>
route "something" do
>
gateway "gateway"
>
device "eth0"
>
action :add
>
# action [ :add ]
>
end
>
>
The route.rb provider includes this code:
>
>
def generate_config
>
...
>
>
if resource.action == :add
>
>
This condition doesn't work for me because resource.action is always
>
an array no matter how I specify my action in recipe.
>
>
Is this know bug of Chef 10.12.0?
>
Yes. Your are right. There seems to be a bug in the "route" provider.
I will try to solve it in this ticket:
http://tickets.opscode.com/browse/CHEF-3332
In theory "action" method should work both with an array and with a
symbol.
Meanwhile it should work if you remove the line "action :add" from
your route resource (anyway "add" is the default action).
--
Xabier de Zuazo Oteiza
IT System Administrator - Onddo Labs S.L.
t: (+34) 946.569.935
onddo.com
Attachment:
signature.asc
Description: PGP signature
Archive powered by MHonArc 2.6.16.