Browse Source

Don't require tty to run sudo

Set Defaults !requiretty so that ansible can run sudo without a terminal. Fixes #773
error10 9 years ago
parent
commit
9c5cec3254
1 changed files with 1 additions and 0 deletions
  1. 1 0
      playbooks/libvirt/openshift-cluster/templates/user-data

+ 1 - 0
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