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 failed_when: false
changed_when: "'not found' in project_exists.stderr" changed_when: "'not found' in project_exists.stderr"
- name: project.yml - name: Copy project template
when: "'not found' in project_exists.stderr" template:
include_role: src="{{roles_path}}/openshift/project/templates/project.yml"
name: openshift/object dest=/etc/openshift_apps/{{app}}/project.yml
vars:
objectname: project.yml - name: Create project
template_fullpath: "{{roles_path}}/openshift/project/templates/project.yml" shell: oc apply -f /etc/openshift_apps/{{app}}/project.yml
when: project_exists.changed
- name: deployer.yml - name: deployer.yml
include_role: include_role: