kenn/sunzi — pull request #7 by mm53bar (2012-03-26 19:26:55+00:00)
Title: Add a flag to call install.sh with sudo

When deploying on EC2, I'm stuck with the ubuntu user that is created by default. I often need to use the passwordless sudo in order to do something as root (i.e. upgrade, install, etc.). However, I don't want that to be sprinkled all through my recipes because it's not needed on other VM hosts (i.e. Linode).

To support that, I added a --sudo flag to the deploy call so that sudo can be requested as a run-time option. I've defaulted it to false to support backwards compatibility. A deploy call would now look like this:

sunzi deploy ubuntu@0.0.0.0 app --sudo

A call that omitted the --sudo would be run as normal.