- From: Ringo De Smet <
>
- To: Chef Users <
>
- Subject: [chef] Re: chef_client: better default chef_server_url location?
- Date: Tue, 8 Feb 2011 15:37:37 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=L3I73K3c3aGeOzoFiK5pUIomgjmOBVz0QFRnyxJ8J9i1QcoD2VwEBejsUdfh087QsW c5nB6e52HUep320LUGPiFt94bMb1qhOTGm8XVWPFk8ZBtG57ulcBrIIj4YQfhK+DRYXv oyXDkm35hegc3Vbk9tFlUhWxQ5gANxCDPkc0k=
Joshua,
On 8 February 2011 11:30, Ringo De Smet
<
>
wrote:
>
>
I am trying the chef_client cookbook. The default chef_server_url is
>
default localhost:4000. Wouldn't a better default URL be just the
>
server location that the client is communicating with? Since the
>
client is first registered with the server, I would expect that this
>
location can be retrieved somewhere by the cookbook during the compile
>
phase, no?
The bootstrapping chef client running the chef-client cookbook is in
my case running against a server, which means that it has the
:chef_server_url configured. I have updated my client.rb.erb template
to:
<% if Chef::Config.has_key?(:chef_server_url) -%>
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
<% else -%>
chef_server_url "<%= node["chef_client"]["server_url"] %>"
<% end -%>
This takes over the setting for my /etc/chef/client.rb file. Works
like a charm for me against Opscode Platform (my test env) and my own
Chef production server.
Ringo
Archive powered by MHonArc 2.6.16.