How to run a chef resource as a specific user

I am having problems installing ruby โ€‹โ€‹on a chef server without breaking the chef's commands.

My idea is to add a user account to run my application and have this user PATH save the ruby โ€‹โ€‹that I install separately from the chef; this way when I run the app as a new user it doesn't break the chef so easily.

How do I get the chef to install and run commands as a specific user?

Either that or someone can point me to the correct way to do this (install and use ruby โ€‹โ€‹without breaking the inner ruby)

I use windows, and yes, I know an exercise in sadomasochism and what, but this is what I have to do.

+3


source to share


1 answer


Most resources that execute a command take an argument user

:



execute 'msiexec /q mumblesomething' do
  user 'me'
end

      

+2


source







All Articles