[chef] switch between root and non-root user within a chef script


Chronological Thread 
  • From: Andrew Sharp < >
  • To:
  • Subject: [chef] switch between root and non-root user within a chef script
  • Date: Thu, 25 Jul 2013 14:19:03 -0700

Hi,

I'm writing a cookbook to set up a development environment on OS X. This cookbook installs packages via Homebrew as well as .dmg packages. I am using the homebrew cookbook
for the homebrew packages, and the dmg cookbook for the .dmg packages.

I would like the script to run without any user input. Since the .dmg packages require root permissions, they stop the script for the user to enter their password. This could be alleviated by running the script with sudo. However, Homebrew requires that it be run as non-root, so I cannot run the script with sudo.

Any suggestions?

Thanks,


Andrew



Archive powered by MHonArc 2.6.16.

§