Recommendations for bootstrapping Ubuntu server

view story

http://serverfault.com – When I create new Ubuntu 12.10 instances, I typically bootstrap them by manually SSHing onto the machine and editing the sudoers to put a NOPASSWD on the default user (e.g., ec2-user, azureuser, etc.). Then my install scripts can sudo various commands without having to provide a password. I don't have anything against passwords. It's just that when I try to do a password-based sudo over SSH using a bash script, sudo complains that there's no tty ("sudo: no tty present and no askpass program specified"). Also, I need this to be completely automated--it shouldn't require somebody to type in a (HowTos)