소스 검색

ec2 - force !requiretty for ssh_user

Jason DeTiberus 9 년 전
부모
커밋
666fd1d7ef
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      playbooks/aws/openshift-cluster/templates/user_data.j2

+ 7 - 0
playbooks/aws/openshift-cluster/templates/user_data.j2

@@ -43,3 +43,10 @@ growpart:
 runcmd:
 - xfs_growfs /var
 {% endif %}
+
+{% if deployment_vars[deployment_type].sudo %}
+- path: /etc/sudoers.d/99-{{ deployment_vars[deployment_type].ssh_user }}-cloud-init-requiretty
+  permissions: 440
+  content: |
+    Defaults:{{ deployment_vars[deployment_type].ssh_user }} !requiretty
+{% endif %}