summaryrefslogtreecommitdiffstats
path: root/roles/openshift_openstack/templates
diff options
context:
space:
mode:
authorBogdan Dobrelya <bdobreli@redhat.com>2018-01-15 09:45:14 +0100
committerBogdan Dobrelya <bdobreli@redhat.com>2018-02-09 17:59:31 +0100
commitd03e39704e8148fa1cf1869c0e5003ecf48c4f57 (patch)
tree333ba660afe1d560161f9b023368c66c9aa0fc48 /roles/openshift_openstack/templates
parent16bdfc74b34277cccb62935cc361ff7c486ae92d (diff)
downloadopenshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.tar.gz
openshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.tar.bz2
openshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.tar.xz
openshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.zip
Fix cloud init runcmd templating
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Diffstat (limited to 'roles/openshift_openstack/templates')
-rw-r--r--roles/openshift_openstack/templates/user_data.j213
1 files changed, 11 insertions, 2 deletions
diff --git a/roles/openshift_openstack/templates/user_data.j2 b/roles/openshift_openstack/templates/user_data.j2
index e130e71c3..352744285 100644
--- a/roles/openshift_openstack/templates/user_data.j2
+++ b/roles/openshift_openstack/templates/user_data.j2
@@ -13,8 +13,17 @@ write_files:
Defaults:openshift !requiretty
{% if openshift_openstack_cloud_init_runcmd %}
-runcmd:
+ - path: /root/ansible_install.sh
+ permissions: '0544'
+ content: |
{% for cmd in openshift_openstack_cloud_init_runcmd %}
- - {{ cmd|map('string')|list|tojson }}
+{% if cmd is string %}
+ {{ cmd }}
+{% elif cmd is iterable %}
+ {{ cmd|join(' ') }}
+{% endif %}
{% endfor %}
+
+runcmd:
+ - /root/ansible_install.sh
{% endif %}