Files
fedora-infra_ansible/roles/openshift/object/tasks/main.yml
Patrick Uiterwijk cba7d519d4 Silly me, ClusterRoles are separate objects
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-10-08 20:45:48 +00:00

28 lines
909 B
YAML

- name: Create temporary file
tempfile: state=file suffix=.yml
register: tmpfile
run_once: true
- 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
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
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
run_once: true
- name: Call `oc apply` on the copied file
shell: oc -n {{app}} apply -f {{tmpfile.path}}
run_once: true
- name: Delete temporary file
file: path={{tmpfile.path}} state=absent
run_once: true