- name: Delete object file ({{tmpfile.path}})
  file:
    path=/etc/openshift_apps/{{app}}/{{objectname}}.yml
    state=absent
  when: objecttype != 'project'

- name: Delete project files ({{tmpfile.path}})
  file:
    path=/etc/openshift_apps/{{app}}
    state=absent
  when: objecttype == 'project'

- name: Call `oc delete` on the object
  shell: oc -n {{app}} delete {{objecttype}}/{{objectname}}
