[chef] Re: Chef provisioning - use SSH driver only if private ip exists


Chronological Thread 
  • From: Tyler Ball < >
  • To:
  • Subject: [chef] Re: Chef provisioning - use SSH driver only if private ip exists
  • Date: Wed, 6 May 2015 10:45:32 -0700

Can you rub a little ruby on it?

```
if system("ping 127.0.0.1 -c 1")
  with_driver ‘ssh’
else
  with_driver ‘aws::us-west-1’
end
```

-T

> On May 4, 2015, at 9:11 PM, Medya 
> < >
>  wrote:
> 
> I am using chef-zero on different workstations (and my machine objects are 
> not stored consistently)
> 
> I would like my machine recipe, to use SSH driver to provision a machine if 
> a machine with that private IP exists, and if not I want regular AWS driver 
> to be used...
> 
> ideas?
> 
> 




Archive powered by MHonArc 2.6.16.

§