From 9c5cec32545510875de3ca2e149e1aff2909102e Mon Sep 17 00:00:00 2001 From: error10 Date: Fri, 30 Oct 2015 20:41:05 -0400 Subject: Don't require tty to run sudo Set Defaults !requiretty so that ansible can run sudo without a terminal. Fixes #773 --- playbooks/libvirt/openshift-cluster/templates/user-data | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/libvirt/openshift-cluster/templates/user-data b/playbooks/libvirt/openshift-cluster/templates/user-data index eacae7c7e..cf57e6489 100644 --- a/playbooks/libvirt/openshift-cluster/templates/user-data +++ b/playbooks/libvirt/openshift-cluster/templates/user-data @@ -21,3 +21,4 @@ ssh_authorized_keys: runcmd: - NETWORK_CONFIG=/etc/sysconfig/network-scripts/ifcfg-eth0; if ! grep DHCP_HOSTNAME ${NETWORK_CONFIG}; then echo 'DHCP_HOSTNAME="{{ item[0] }}.example.com"' >> ${NETWORK_CONFIG}; fi; pkill -9 dhclient; service network restart + - echo "Defaults !requiretty" >> /etc/sudoers.d/00-no-requiretty -- cgit v1.2.3