diff --git a/roles/openshift/object/defaults/main.yml b/roles/openshift/object/defaults/main.yml new file mode 100644 index 0000000000..8198364aab --- /dev/null +++ b/roles/openshift/object/defaults/main.yml @@ -0,0 +1,4 @@ +-- +template: '' +template_fullpath: '' +file: '' diff --git a/roles/openshift/object/tasks/main.yml b/roles/openshift/object/tasks/main.yml index e7c19847b6..06c4f90f9e 100644 --- a/roles/openshift/object/tasks/main.yml +++ b/roles/openshift/object/tasks/main.yml @@ -5,17 +5,17 @@ - name: Copy template {{template}} to temporary file ({{tmpfile.path}}) template: src={{roles_path}}/openshift-apps/{{app}}/templates/{{template}} dest={{tmpfile.path}} - when: template is defined + when: template != '' run_once: true - name: Copy template {{template_fullpath}} to temporary file ({{tmpfile.path}}) template: src={{template_fullpath}} dest={{tmpfile.path}} - when: template_fullpath is defined + when: template_fullpath != '' run_once: true - name: Copy file {{file}} to temporary file ({{tmpfile.path}}) copy: src={{roles_path}}/openshift-apps/{{app}}/files/{{file}} dest={{tmpfile.path}} - when: file is defined + when: file != '' run_once: true - name: Call `oc apply` on the copied file