[chef-dev] Re: Re: How to parse knife.rb


Chronological Thread 
  • From: Cassiano Leal < >
  • To: Adam Jacob < >
  • Cc: Chef Dev < >
  • Subject: [chef-dev] Re: Re: How to parse knife.rb
  • Date: Thu, 21 Mar 2013 23:29:11 -0300

What do you mean no deps? I need Chef for that, right? Or is Chef::Config in vagrant?

- cassiano

On Thursday, March 21, 2013 at 23:23, Adam Jacob wrote:

If you don't care about validity, just take chef/config.rb, and then:

Chef::Config.from_file

And you're golden. No deps.

Sent from my iPhone

On Mar 21, 2013, at 7:11 PM, "Cassiano Leal" < "> > wrote:

Hi,

Sorry if this is not the best forum for my question, but it seems to be more appropriate than the regular Chef's user list.

I'm the author of vagrant-butcher [0], a Vagrant plugin that deletes node and client when the VM is destroyed.

The way the plugin works is by reading knife's configuration and then using Chef::REST to do the deletions.

This has to change now, though. It's not possible to install the plugin on the latest version of Vagrant because it requires a version of net-ssh that conflicts with Chef's. [1]

What I'm trying to do now is to parse knife.rb so that I can feed Ridley [2] the constructor parameters it needs to create a connection to Chef's API, but this is proving to be quite a challenge.

Has anyone done it before? Does anyone have any pointers to the best way of doing that?

I've been experimenting with evaluating the code in knife.rb, but it's (1) an ugly hack, and (2) not working :)

Thanks!
- cassiano





Archive powered by MHonArc 2.6.16.

§