When we try to apply project.yml, the namespace does not yet exist

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-05-03 13:58:06 +02:00
parent 0932860a71
commit 09a12cf4b5

View file

@ -14,13 +14,14 @@
failed_when: false
changed_when: "'not found' in project_exists.stderr"
- name: project.yml
when: "'not found' in project_exists.stderr"
include_role:
name: openshift/object
vars:
objectname: project.yml
template_fullpath: "{{roles_path}}/openshift/project/templates/project.yml"
- name: Copy project template
template:
src="{{roles_path}}/openshift/project/templates/project.yml"
dest=/etc/openshift_apps/{{app}}/project.yml
- name: Create project
shell: oc apply -f /etc/openshift_apps/{{app}}/project.yml
when: project_exists.changed
- name: deployer.yml
include_role: