summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/ands_kaas/tasks/do_project.yml6
-rw-r--r--roles/ands_kaas/tasks/do_script.yml10
-rw-r--r--roles/ands_kaas/tasks/ocscript.yml2
-rw-r--r--roles/ands_kaas/tasks/project.yml2
4 files changed, 16 insertions, 4 deletions
diff --git a/roles/ands_kaas/tasks/do_project.yml b/roles/ands_kaas/tasks/do_project.yml
index 71a54ad..e64e9e3 100644
--- a/roles/ands_kaas/tasks/do_project.yml
+++ b/roles/ands_kaas/tasks/do_project.yml
@@ -5,7 +5,9 @@
- name: "Run OC script"
include_tasks: ocscript.yml
run_once: true
- when: kaas_project_config.oc is defined
+ vars:
+ script: "{{ kaas_project_script }}"
+ when: kaas_project_script is defined
- block:
- name: Configure storage
@@ -21,5 +23,5 @@
include_tasks: do_apps.yml
run_once: true
when:
- - kaas_project_config.oc is undefined
+ - kaas_project_script is undefined
diff --git a/roles/ands_kaas/tasks/do_script.yml b/roles/ands_kaas/tasks/do_script.yml
new file mode 100644
index 0000000..7dc9dad
--- /dev/null
+++ b/roles/ands_kaas/tasks/do_script.yml
@@ -0,0 +1,10 @@
+---
+- name: Ensure OpenShift template directory exists
+ file: path="{{ kaas_template_path }}" state="directory" mode=0755 owner=root group=root
+
+- name: "Run OC script"
+ include_tasks: ocscript.yml
+ run_once: true
+ vars:
+ script: "{{ kaas_script | default(kaas_project_script) }}"
+
diff --git a/roles/ands_kaas/tasks/ocscript.yml b/roles/ands_kaas/tasks/ocscript.yml
index 6890f43..077e92b 100644
--- a/roles/ands_kaas/tasks/ocscript.yml
+++ b/roles/ands_kaas/tasks/ocscript.yml
@@ -2,7 +2,7 @@
- include_tasks: ocitem.yml
# delegate_to: "{{ groups.masters[0] }}"
run_once: true
- with_items: "{{ kaas_project_config.oc }}"
+ with_items: "{{ script }}"
loop_control:
loop_var: ocitem
\ No newline at end of file
diff --git a/roles/ands_kaas/tasks/project.yml b/roles/ands_kaas/tasks/project.yml
index 879f34a..2c05afd 100644
--- a/roles/ands_kaas/tasks/project.yml
+++ b/roles/ands_kaas/tasks/project.yml
@@ -63,4 +63,4 @@
kaas_project_gids: "{{ kaas_project_config.gids | default(kaas_openshift_gids) }}"
kaas_project_uids: "{{ kaas_project_config.uids | default(kaas_openshift_uids) }}"
kaas_blockvol_info: "{{ block_info }}"
- \ No newline at end of file
+ kaas_project_script: "{{ kaas_project_config.oc | default(omit) }}"