summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-03 14:13:25 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-03 14:13:25 -0500
commit3a6ff3121f3afa40c5d22aa75c1696ead9b3424d (patch)
tree1ca429d6924de82ee5f621d83ab22b9879900063
parent3d3f2875bb89cdbdeadd7da4868355669ba12122 (diff)
parentd75f1b5879dce664f86eea25dff66417618e379e (diff)
downloadopenshift-3a6ff3121f3afa40c5d22aa75c1696ead9b3424d.tar.gz
openshift-3a6ff3121f3afa40c5d22aa75c1696ead9b3424d.tar.bz2
openshift-3a6ff3121f3afa40c5d22aa75c1696ead9b3424d.tar.xz
openshift-3a6ff3121f3afa40c5d22aa75c1696ead9b3424d.zip
Merge pull request #778 from error10/patch-1
Don't require tty to run sudo
-rw-r--r--playbooks/libvirt/openshift-cluster/templates/user-data6
1 files changed, 6 insertions, 0 deletions
diff --git a/playbooks/libvirt/openshift-cluster/templates/user-data b/playbooks/libvirt/openshift-cluster/templates/user-data
index eacae7c7e..e0c966e45 100644
--- a/playbooks/libvirt/openshift-cluster/templates/user-data
+++ b/playbooks/libvirt/openshift-cluster/templates/user-data
@@ -19,5 +19,11 @@ system_info:
ssh_authorized_keys:
- {{ lookup('file', '~/.ssh/id_rsa.pub') }}
+write_files:
+ - path: /etc/sudoers.d/00-openshift-no-requiretty
+ permissions: 440
+ content: |
+ Defaults:openshift !requiretty
+
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