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?
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.
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
Can you make a ticket and/or pull request for this? I've been bitten by this one when helping users on IRC.