+ os.image = 'BAD IMAGE'
+ override.ssh.username = 'baduser'
+ end
+
+ case ENV['IMAGE']
+ when /.*ubuntu.*/i
+ override.ssh.username = 'ubuntu'
+
+ when /.*fedora.*/i
+ override.ssh.username = 'fedora'
+
+ # take care of the tty requirement by fedora for sudo
+ os.user_data = "#!/bin/bash
+/bin/sed -i 's/ requiretty/ !requiretty/' /etc/sudoers;"
+
+ when /.*centos.*/i
+ override.ssh.username = 'centos'
+
+ # take care of the tty requirement by centos for sudo
+ os.user_data = "#!/bin/bash
+/bin/sed -i 's/ requiretty/ !requiretty/' /etc/sudoers;"