- From: Will Sargent <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Setting up a node from command line?
- Date: Mon, 14 Dec 2009 11:19:46 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=ncePczhGifqWqiOQsOu0Oodd+JgD0WErGd7hTyYNqcIDz4afKtXHqH18xg9qoHBi1H mF8sT+XiVqWS1X/4hgxBK1YFhPf/41sBuRJSuCVjMnEbpQ+zcRgrbFeNpxhHclr4+BLP BDV6MFsMPEb04iILs/+LlmPePqibE7TbLTRAs=
On Sat, Dec 12, 2009 at 2:13 PM, Adam Jacob
<
">
> wrote:
Will Sargent wrote:
> You likely have a pending registration for this client, and it's
> making it so that you can't use the validation token for it. If you
> delete the registration, it should complete with the token.
>
>
> How do I delete the registration from the command line?
There is now way to do this with the current version of Chef easily.
Have you thought about creating an SSH tunnel, and using your web
browser? I realize this is less than ideal (and the fix is in!) but it
will get you where you want to be for now.
> Okay. How do I add a node using the JSON file?
With the -j option to chef-client or chef-solo.
http://wiki.opscode.com/display/chef/Setting+the+run_list+in+JSON
New nodes get added when they are first run - so the goal here would be
to set the validation token, then use a json file on each client to
configure it's settings.
Well, the docs say "
The JSON attributes file can be used to add specific Roles or Recipes to a node during chef-client/chef-solo run time." Not adding nodes themselves. So if they can do that, it's undocumented.
So if I'm reading this right, I need to run
sudo chef-client -j nothing.json -t "token"
where nothing.json contains { "run_list": [ ] }
And that will automatically create a node on the system, with nothing added to it?
Will.
Archive powered by MHonArc 2.6.16.