disaacs/puppet-geolocation — pull request #1 by dylanahsmith (2013-10-11 21:44:47+00:00)
Title: Use boxen to switch users rather than using sudo directly.

@disaacs for review

## Problem

If sudo hadn't been run in the last 5 minutes, then running boxen will result in the error

```
Notice: /Stage[main]/Geolocation/Exec[download isp database]/returns: sudo: no tty present and no askpass program specified
```

The workaround was to just run sudo to prompt for a password before running boxen.

## Solution

I used boxen's ability to run a command as a different user, which will avoid having to use the sudo command.

## Testing

I manually tested these changes as follows after updating my local boxen's Puppetfile to use these changes

```
# Force boxen to re-download these files
sudo rm /usr/share/GeoIP/*.dat

# Force sudo to prompt for a password the next time sudo is run
sudo rmdir /var/db/sudo/$USER

# Test the changes
boxen
```