- From: Adam Jacob <
>
- To: Cassiano Leal <
>
- Cc: Chef Dev <
>
- Subject: [chef-dev] Re: How to parse knife.rb
- Date: Fri, 22 Mar 2013 02:23:46 +0000
- Accept-language: en-US
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
>
>
[0] https://github.com/cassianoleal/vagrant-butcher
>
[1] https://github.com/cassianoleal/vagrant-butcher/issues/5
>
[2] https://github.com/reset/ridley
>
Archive powered by MHonArc 2.6.16.