Allow sudo access without a controlling terminal

Ironic setup uses some external scripts that use sudo but they
are not called with a TTY.  This patch allows STACK_USER sudo
access without a controlling terminal.

Change-Id: I0c60fcd5d8418738405d4dd9d08fdf5c8f766829
diff --git a/stack.sh b/stack.sh
index 7fa4d37..38d8a64 100755
--- a/stack.sh
+++ b/stack.sh
@@ -195,6 +195,7 @@
 # Some binaries might be under /sbin or /usr/sbin, so make sure sudo will
 # see them by forcing PATH
 echo "Defaults:$STACK_USER secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin" >> $TEMPFILE
+echo "Defaults:$STACK_USER !requiretty" >> $TEMPFILE
 chmod 0440 $TEMPFILE
 sudo chown root:root $TEMPFILE
 sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh