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


Chronological Thread 
  • From: Seth Chisamore < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Chef bash resource not executing as specified user
  • Date: Wed, 25 Jan 2012 09:37:35 -0800

Arthur,
FWIW this is the recipe we at Opscode use to deploy our instance of hubot:
https://gist.github.com/6e4b07ec2a650baa7ac3

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.

§