[chef] Re: How to check the whether elastic ip is already associated or not?


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: How to check the whether elastic ip is already associated or not?
  • Date: Tue, 29 May 2012 23:24:09 +0530

i think the resource is already idempotent.

On Tue, May 29, 2012 at 11:13 PM, Sachin Sagar Rai < " target="_blank"> > wrote:
Hi Chefellas!

I've the following aws resource in my recipe.

  aws_elastic_ip "eip_product" do
    aws_access_key aws['aws_access_key_id']
    aws_secret_access_key aws['aws_secret_access_key']
    ip eip
    action :associate
  end

But what I want is a conditional guard like only_if, not_if, etc...

So, if the elastic ip already attached, I don't want to try it to reattach. Something like `not_if { associated }` 

I looked inside the aws cookbook, but couldn't find anything? 

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow





Archive powered by MHonArc 2.6.16.

§