summaryrefslogtreecommitdiffstats
path: root/roles/openshift_openstack/tasks/provision.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_openstack/tasks/provision.yml')
-rw-r--r--roles/openshift_openstack/tasks/provision.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/openshift_openstack/tasks/provision.yml b/roles/openshift_openstack/tasks/provision.yml
new file mode 100644
index 000000000..dccbe334c
--- /dev/null
+++ b/roles/openshift_openstack/tasks/provision.yml
@@ -0,0 +1,25 @@
+---
+- name: Generate the templates
+ include: generate-templates.yml
+ when:
+ - openshift_openstack_stack_state == 'present'
+
+- name: Handle the Stack (create/delete)
+ ignore_errors: False
+ register: stack_create
+ os_stack:
+ name: "{{ openshift_openstack_stack_name }}"
+ state: "{{ openshift_openstack_stack_state }}"
+ template: "{{ stack_template_path | default(omit) }}"
+ wait: yes
+
+- name: Add the new nodes to the inventory
+ meta: refresh_inventory
+
+- name: CleanUp
+ include: cleanup.yml
+ when:
+ - openshift_openstack_stack_state == 'present'
+
+# TODO(shadower): create the registry and PV Cinder volumes if specified
+# and include the `prepare-and-format-cinder-volume` tasks to set it up