Skip to content

Instantly share code, notes, and snippets.

@dstrelau
Created June 25, 2010 21:30
Show Gist options
  • Save dstrelau/453476 to your computer and use it in GitHub Desktop.
Save dstrelau/453476 to your computer and use it in GitHub Desktop.
chef-client -c client.rb -j dna.json
# see http://github.com/opscode/cookbooks/blob/master/chef/attributes/default.rb
[Fri, 25 Jun 2010 14:29:42 -0700] INFO: Starting Chef Run
[Fri, 25 Jun 2010 14:29:42 -0700] INFO: Storing updated cookbooks/chef/recipes/client.rb in the cache.
[Fri, 25 Jun 2010 14:29:43 -0700] INFO: $$$$$$$$ http://chef.localdomain:4000
[Fri, 25 Jun 2010 14:29:43 -0700] INFO: %%%%%%%%%%% http://chef.localdomain:4000
[Fri, 25 Jun 2010 14:29:43 -0700] INFO: Writing updated content for template[/etc/chef/client.rb] to /etc/chef/client.rb
[Fri, 25 Jun 2010 14:29:43 -0700] INFO: Started service service[chef-client] successfully
[Fri, 25 Jun 2010 14:29:43 -0700] INFO: ########## http://chef.localdomain:4000
[Fri, 25 Jun 2010 14:29:43 -0700] INFO: template[/etc/chef/client.rb] sending create action to ruby_block[reload_client_config] (delayed)
chef_server_url "http://mint-01:4000/"
cache_options({ :path => "/var/cache/chef/checksums", :skip_expires => true })
file_cache_path "/var/cache/chef"
{
"chef": {
"server_url": "http://mint-01:4000/",
"path": "/var/lib/chef",
"backup_path": "/var/lib/chef/backup",
"cache_path": "/var/cache/chef",
"run_path": "/var/run/chef"
},
"run_list": [ "role[client]" ]
}
# http://github.com/opscode/cookbooks/blob/master/chef/recipes/client.rb#L28-33
# [...]
Chef::Log.info("$$$$$$$$ #{node[:chef][:server_url]}")
ruby_block "reload_client_config" do
Chef::Log.info("%%%%%%%%%%% #{node[:chef][:server_url]}")
block do
Chef::Log.info("########## #{node[:chef][:server_url]}")
Chef::Config.from_file("/etc/chef/client.rb")
end
action :nothing
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment