summaryrefslogtreecommitdiffstats
path: root/roles/openshift_openstack
diff options
context:
space:
mode:
authorBogdan Dobrelya <bdobreli@redhat.com>2018-01-11 10:59:38 +0100
committerBogdan Dobrelya <bdobreli@redhat.com>2018-02-09 17:59:11 +0100
commit5d2eb42f0a600fc4e262dabdee36e0440cdb2537 (patch)
tree223407ea616c5ddfd123e766c97d4380f483d53f /roles/openshift_openstack
parent7fb1a84518908e5ca3dcb54c620f589307dc3e97 (diff)
downloadopenshift-5d2eb42f0a600fc4e262dabdee36e0440cdb2537.tar.gz
openshift-5d2eb42f0a600fc4e262dabdee36e0440cdb2537.tar.bz2
openshift-5d2eb42f0a600fc4e262dabdee36e0440cdb2537.tar.xz
openshift-5d2eb42f0a600fc4e262dabdee36e0440cdb2537.zip
[openstack] custom user commands for cloud-init
Allow to specify additional user commands executed on all Nova servers provisioned via Heat. An example use case is installing and starting os-collect-config agents to put Nova servers under the configuration management driven via the host openstack cloud Heat services. This allows to integrate with another deployment tools like TripleO. Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Diffstat (limited to 'roles/openshift_openstack')
-rw-r--r--roles/openshift_openstack/defaults/main.yml2
-rw-r--r--roles/openshift_openstack/templates/user_data.j27
2 files changed, 9 insertions, 0 deletions
diff --git a/roles/openshift_openstack/defaults/main.yml b/roles/openshift_openstack/defaults/main.yml
index 2bdb81632..4e3b7939a 100644
--- a/roles/openshift_openstack/defaults/main.yml
+++ b/roles/openshift_openstack/defaults/main.yml
@@ -94,6 +94,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..e8185edfb 100644
--- a/roles/openshift_openstack/templates/user_data.j2
+++ b/roles/openshift_openstack/templates/user_data.j2
@@ -11,3 +11,10 @@ write_files:
permissions: 440
content: |
Defaults:openshift !requiretty
+
+{% if openshift_openstack_provision_user_commands %}
+runcmd:
+{% for cmd in openshift_openstack_provision_user_commands %}
+ - {{ cmd }}
+{% endfor %}
+{% endif %}