浏览代码

Disable requiretty for only the openshift user

Use write_files to disable requiretty for the openshift user as suggested by @detiberm, fixes #773
error10 9 年之前
父节点
当前提交
d75f1b5879
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      playbooks/libvirt/openshift-cluster/templates/user-data

+ 6 - 1
playbooks/libvirt/openshift-cluster/templates/user-data

@@ -19,6 +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
-  - echo "Defaults !requiretty" >> /etc/sudoers.d/00-no-requiretty