- From: Matthew King <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Setting up a node from command line?
- Date: Tue, 15 Dec 2009 08:48:05 +0000
Will Sargent
<
>
writes:
>
Well, the docs say "The JSON attributes file can be used to add specific
>
Roles </display/chef/Roles> or Recipes </display/chef/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?
Is a json file even necessary just to create a node? Does 'chef-client
-t token' only create the registration? If so, why? Seems fairly
intuitive that it'd create an empty node also.
Also, as a shortcut, you can take advantage of a bashism to avoid
needlessly creating a temp file:
chef-client -j <(echo '{"recipes": [ ]}') -t "token"
Matthew
--
I must take issue with the term "a mere child", for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
-- Fran Lebowitz
Archive powered by MHonArc 2.6.16.