[chef] Re: Re: Re: Re: Re: Re: Chef bash resource not executing as specified user


Chronological Thread 
  • From: Arthur Kalmenson < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Chef bash resource not executing as specified user
  • Date: Thu, 26 Jan 2012 13:10:54 -0500

Daniel,
Thanks, setting the "environment" attribute worked. I've voted and watched that issue, so we'll see where it goes.

Seth,
Thanks for that Gist, it gave me good ideas on how to implement it, and it helped a lot. Any chance of integrating a similar cookbook with the current opscode cookbooks? I guess I could tweak mine to be similar and make a pull request for that..

--
Arthur Kalmenson


On Wed, Jan 25, 2012 at 12:37 PM, Seth Chisamore < "> > wrote:
Arthur,
FWIW this is the recipe we at Opscode use to deploy our instance of hubot:

One thing to note is an explicit execution of 'npm install' is not required since the hubot bin file does that for you every time hubot launches.

Hope that helps!

-- 
Seth Chisamore
Software Design Engineer, Opscode, Inc.
IRC, Skype, Twitter, Github: schisamo

On Wednesday, January 25, 2012 at 8:42 AM, Daniel DeLeo wrote:



On Wednesday, January 25, 2012 at 8:32 AM, Arthur Kalmenson wrote:

Leonardo,
Yes, running as sudo

Joseph,
Yeah, it looks the same to me as well. But how would I work around that?

Daniel,
That makes sense, but is there a way to source it so it runs as if it's logged in?

You could try adding the `-l` flag to the bash resource, and setting the HOME environment variable using the `environment` attribute of the bash resource.
I created an improvement request for this: http://tickets.opscode.com/browse/CHEF-2288 There are some workarounds posted.

Thank you all for your help.

--
Arthur Kalmenson




--
Dan DeLeo





Archive powered by MHonArc 2.6.16.

§