[chef] Running package install with sudo


Chronological Thread 
  • From: Tristan Sloughter < >
  • To:
  • Subject: [chef] Running package install with sudo
  • Date: Tue, 7 Dec 2010 15:37:48 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=v8nyVEJKRcaynba97nJD20tfpcid5hDxRaILVBQD57Ro3W1kNaeYrk+eiwoTeSLDsM QZtsmQrDq98pNZXYrpvMJ9ybaecvGPEmKPOYv06iyIKq12ZXguct4/q7qrL1HAwuPi8A jckofUD66mWDmEWhEOZrBnXDxnwcCQ7385tb4=

I run my chef clients not as root. I want to be able to install an rpm (the RPM does not allow it to be relocated with --prefix, so it must go in /usr). 

I didn't want to but it seems I need to either run the client as root or make my user have sudo access with no password.

I decided to try the user be able to run sudo without a password to install packages. However the 'package' resource does not appear to have a way to tell it to run as a certain user. 

Is this true? Is there a way or am I stuck either running the client as root or using a bash command instead of the 'package' resource?

Thanks,
Tristan



Archive powered by MHonArc 2.6.16.

§