Files
fedora-infra_ansible/roles/openshift/object/tasks/main.yml
Aurélien Bompard 593d7fe7f0 Add support for installing OS app that don't match with the ansible app
And use it for the CentOS instance of Noggin.

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-11-30 14:06:11 +01:00

19 lines
1.0 KiB
YAML

- name: Copy template {{template}} to temporary file ({{tmpfile.path}})
template: src={{roles_path}}/openshift-apps/{{app}}/templates/{{template}} dest=/etc/openshift_apps/{{os_app}}/{{objectname}}
when: template is defined
register: object_template
- name: Copy template {{template_fullpath}} to temporary file ({{tmpfile.path}})
template: src={{template_fullpath}} dest=/etc/openshift_apps/{{os_app}}/{{objectname}}
when: template_fullpath is defined and template is not defined
register: object_template_fullpath
- name: Copy file {{file}} to temporary file ({{tmpfile.path}})
copy: src={{roles_path}}/openshift-apps/{{app}}/files/{{file}} dest=/etc/openshift_apps/{{os_app}}/{{objectname}}
when: file is defined and template is not defined and template_fullpath is not defined
register: object_file
- name: Call `oc apply` on the copied file
shell: oc -n {{os_app}} apply -f /etc/openshift_apps/{{os_app}}/{{objectname}}
when: object_template.changed or object_template_fullpath.changed or object_file.changed