On Saturday, September 22, 2012 at 10:20 AM, Matt Ray wrote:
Great idea, here's something I whipped together to get that to work. I modified my bootstrap template to change the first-boot.json stanza to this:
(cat <<'EOP'<%= { "run_list" => @run_list, "bootstrap" => { "client" => Chef::Config[:client_key].split('/').last, "time" => Time.now.to_i } }.to_json %>EOP) > /etc/chef/first-boot.json
this renders to this:
{"run_list":[],"bootstrap":{"client":"mray.pem","time":1348288293}}
and looks like this:
knife node show ubuntu1-1204.vm -a bootstrapbootstrap:client: mray.pemtime: 1348288293
Thanks,Matt RaySenior Technical Evangelist | Opscode Inc."> | (512) 731-2218Twitter, IRC, GitHub: mattray
From: Andrea Campi [ "> ]
Sent: Friday, September 21, 2012 4:01 PM
To: ">
Cc: ">
Subject: [chef] Re: How to know the developer name who ran the knife cmd?
It sounds like all you need is a knife plugin that reads ENV['USER'] and sets a node attribute.Ohai!
Is there any api call to know the developer's name who fired the knife cmd to launch a new instance?
-------------------------------------------@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.comSent with Sparrow
Archive powered by MHonArc 2.6.16.