Thanks Seth… Where did you find the information on the Chef::Config object ?? I am still a newbie on chef… :O)
I need to parse that URL to just the fqdn.
From: Seth Chisamore [mailto:email@example.com]
Sent: Thursday, January 26, 2012 9:31 AM
Subject: [chef] Re: Chef server name attribute?
You should be able to to grab it from the Chef::Config object
Warning: This file is managed by the Chef server <%= Chef::Config[:chef_server_url] %> on node <%= node[‘fqdn’] %>!
Take a look at the chef-client and pxe_dust cookbooks for more example usage:
Software Design Engineer, Opscode, Inc.
IRC, Skype, Twitter, Github: schisamo
On Thursday, January 26, 2012 at 6:14 AM, Van Fossan,Randy wrote:
Is there any attribute that contains the chef server fqdn on the client node? I would like to add it into the template so that humans would know which chef server is managing that node. I know they could look in the /etc/chef/client.rb , but, it would be nice to use something like the following:
# Warning: This file is managed by the Chef server <% node['chefserver'] %> on node <%= node['fqdn'] %>!
I also know I could code for it, but I am looking for the best way so as to keep the chef runs as efficient as possible.