summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster/templates
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/aws/openshift-cluster/templates')
-rw-r--r--playbooks/aws/openshift-cluster/templates/user_data.j211
1 files changed, 9 insertions, 2 deletions
diff --git a/playbooks/aws/openshift-cluster/templates/user_data.j2 b/playbooks/aws/openshift-cluster/templates/user_data.j2
index 82c2f4d57..3621a7d7d 100644
--- a/playbooks/aws/openshift-cluster/templates/user_data.j2
+++ b/playbooks/aws/openshift-cluster/templates/user_data.j2
@@ -1,5 +1,5 @@
#cloud-config
-{% if type =='etcd' %}
+{% if type == 'etcd' and 'etcd' in volume_defs[type] %}
cloud_config_modules:
- disk_setup
- mounts
@@ -19,7 +19,7 @@ fs_setup:
partition: auto
{% endif %}
-{% if type == 'node' %}
+{% if type in ['node', 'master'] and 'docker' in volume_defs[type] %}
mounts:
- [ xvdb ]
- [ ephemeral0 ]
@@ -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 %}