On Tuesday, February 8, 2011 at 6:37 AM, Ringo De Smet wrote:
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.