- From: Steven Danna <
>
- To: <
>
- Subject: [chef] Re: Registration when an existing client.pem is present?
- Date: Thu, 6 Jun 2013 06:46:30 -0700
On 6/5/13 1:39 AM, Morgan Blackthorne wrote:
>
I'm guessing that because the client keys can be shared that the answer
>
to this question is no, but is there a way to set things so that if the
>
client name does not exist that it will perform registration instead of
>
trying to use the old key?
It would be possible to create a patch to Chef that checked if the
client existed using the validator client before attempting to use the
client.pem. I'm not a huge fan of adding uses of the validator client
into Chef, however.
>
>
Or is there a specific error code that I can trap for when doing this
>
and detect that it failed?
>
You might be able to do something with the event dispatch system. There
is a node_load_failed event that you could potentially hook into.
Alternatively, it is likely possible to catch the HTTP 401 errors in an
error handler.
Cheers,
Steven
--
Steven Danna
Systems Engineer, Opscode, Inc
GPG Key:
http://stevendanna.github.com/downloads/code/public.key
Attachment:
signature.asc
Description: OpenPGP digital signature
Archive powered by MHonArc 2.6.16.