summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/templates
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-10-18 07:48:17 -0400
committerGitHub <noreply@github.com>2017-10-18 07:48:17 -0400
commit63b77fbe00e4c724452a0256c6fdafc165755962 (patch)
tree6b2b32616fe25f91d0658ea4ef73b79b1b3ab526 /roles/openshift_aws/templates
parent5ff1e1bec64ea99830003a7f7d44de0ac1e65a57 (diff)
parent47d2e205fa6c76ec66cd22b9100b561cd71e6976 (diff)
downloadopenshift-63b77fbe00e4c724452a0256c6fdafc165755962.tar.gz
openshift-63b77fbe00e4c724452a0256c6fdafc165755962.tar.bz2
openshift-63b77fbe00e4c724452a0256c6fdafc165755962.tar.xz
openshift-63b77fbe00e4c724452a0256c6fdafc165755962.zip
Merge pull request #5361 from kwoodson/fix_bootstrap_files
Provisioning updates.
Diffstat (limited to 'roles/openshift_aws/templates')
-rw-r--r--roles/openshift_aws/templates/user_data.j226
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/openshift_aws/templates/user_data.j2 b/roles/openshift_aws/templates/user_data.j2
new file mode 100644
index 000000000..ed9c0ed0b
--- /dev/null
+++ b/roles/openshift_aws/templates/user_data.j2
@@ -0,0 +1,26 @@
+{% if openshift_aws_node_user_data is defined and openshift_aws_node_user_data != '' %}
+{{ openshift_aws_node_user_data }}
+{% else %}
+#cloud-config
+write_files:
+- path: /root/openshift_bootstrap/openshift_settings.yaml
+ owner: 'root:root'
+ permissions: '0640'
+ content: |
+ openshift_group_type: {{ openshift_aws_node_group_type }}
+{% if openshift_aws_node_group_type != 'master' %}
+- path: /etc/origin/node/csr_kubeconfig
+ owner: 'root:root'
+ permissions: '0640'
+ encoding: b64
+ content: {{ openshift_aws_launch_config_bootstrap_token | b64encode }}
+{% endif %}
+runcmd:
+{% if openshift_aws_node_run_bootstrap_startup %}
+- [ ansible-playbook, /root/openshift_bootstrap/bootstrap.yml]
+{% endif %}
+{% if openshift_aws_node_group_type != 'master' %}
+- [ systemctl, enable, {% if openshift_deployment_type == 'openshift-enterprise' %}atomic-openshift{% else %}origin{% endif %}-node]
+- [ systemctl, start, {% if openshift_deployment_type == 'openshift-enterprise' %}atomic-openshift{% else %}origin{% endif %}-node]
+{% endif %}
+{% endif %}