summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_openstack/defaults/main.yml2
-rw-r--r--roles/openshift_openstack/templates/user_data.j216
2 files changed, 18 insertions, 0 deletions
diff --git a/roles/openshift_openstack/defaults/main.yml b/roles/openshift_openstack/defaults/main.yml
index 75bed96f0..75f1300e1 100644
--- a/roles/openshift_openstack/defaults/main.yml
+++ b/roles/openshift_openstack/defaults/main.yml
@@ -96,6 +96,8 @@ openshift_openstack_etcd_volume_size: 2
openshift_openstack_lb_volume_size: 5
openshift_openstack_ephemeral_volumes: false
+# User commands for cloud-init executed on all Nova servers provisioned
+openshift_openstack_provision_user_commands: []
# cloud-config
openshift_openstack_disable_root: true
diff --git a/roles/openshift_openstack/templates/user_data.j2 b/roles/openshift_openstack/templates/user_data.j2
index ccaa5d464..1ca87a429 100644
--- a/roles/openshift_openstack/templates/user_data.j2
+++ b/roles/openshift_openstack/templates/user_data.j2
@@ -11,3 +11,19 @@ write_files:
permissions: 440
content: |
Defaults:openshift !requiretty
+
+{% if openshift_openstack_provision_user_commands %}
+ - path: /root/ansible_install.sh
+ permissions: '0544'
+ content: |
+{% for cmd in openshift_openstack_provision_user_commands %}
+{% if cmd is string %}
+ {{ cmd }}
+{% elif cmd is iterable %}
+ {{ cmd|join(' ') }}
+{% endif %}
+{% endfor %}
+
+runcmd:
+ - /root/ansible_install.sh
+{% endif %}