This is about what I was looking for, thanks
From: Joshua Miller firstname.lastname@example.org
Reply-To: "email@example.com" firstname.lastname@example.org
Date: Fri, 23 Jul 2010 23:29:07 -0500
To: "email@example.com" firstname.lastname@example.org
Subject: [chef] Re: Default roles for new chef clients?
So this a post install script that I run in my pxe boots, I know there are other ways but hey it works for me.
chef pxe with BASE_ROLE
echo “chef chef/chef_server_url string http://chef.int.rdio:4000” | debconf-set-selections
apt-get install -y chef
#Add to correct roles in chef based on Kickstart Meta Data
cat < /root/client.json
“run_list”: [ “role[BASE_ROLE]” ]
cat < /etc/chef/validation.pem
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
register with the server
chef-client -j /root/client.json
We run one more time to make sure its all good
end chef pxe with BASE_ROLE
On Jul 23, 2010, at 9:17 PM, Leinartas, Michael wrote:
I’m just getting started with chef and trying to figure out how it will fit into our infrastructure. Currently I have things set up so that when a new box is created, chef is installed and the client is started with the master server configured. I’d like to use chef to do some further bootstrapping of the server (e.g. set default firewall rules, add users and copy their keys, install some packages). My question is, is there a way for me to specify a default role for new clients that would have the recipes for these tasks configured?
Is this reasonable? Appropriate? Any solutions, ideas, or other comments appreciated.