theforeman/foreman-packaging — pull request #88 by domcleal (2013-08-20 18:15:49+00:00)
Title: Add dependencies and example sudoers file for image building

Posting for review, not merge (I'll do it in thirdparty). @lzap, what do you think of the example sudoers file? The idea is that you'd run:

cp -a /etc/sudoers.d/foreman_discovery{.example,}
sudo -u foreman RAILS_ENV=production ruby193-rake discovery:build_image
rm -f /etc/sudoers.d/foreman_discovery

Bit nasty, but there's not much choice due to how it's implemented as a rake task. Because it's using rake, it starts up the foreman application, which means it connects to the DB, which means for PostgreSQL + ident auth it has to be "foreman".