[chef] Re: action as array vers string


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: action as array vers string
  • Date: Wed, 28 Nov 2012 08:55:01 -0800


On Wednesday, November 28, 2012 at 1:20 AM, Jan Bares wrote:

Hi,

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?

Thank you, Jan
I don't see a bug reported, but looking at the current code, it doesn't seem like this should be a problem now. Do you see any issues using Chef 10.16.2?


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§