Files
fedora-infra_ansible/roles/openshift/object/tasks/main.yml
Ryan Lerch 47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00

20 lines
1.3 KiB
YAML

---
- name: Copy template {{object_template}} to temporary file ({{tmpfile.path}})
ansible.builtin.template: src={{roles_path}}/openshift-apps/{{object_app}}/templates/{{object_template}} dest=/etc/openshift_apps/{{object_os_app}}/{{object_objectname}}
when: object_template is defined
register: object_template_result
- name: Copy template {{object_template_fullpath}} to temporary file ({{tmpfile.path}})
ansible.builtin.template: src={{object_template_fullpath}} dest=/etc/openshift_apps/{{object_os_app}}/{{object_objectname}}
when: object_template_fullpath is defined and object_template is not defined
register: object_template_fullpath_result
- name: Copy file {{object_file}} to temporary file ({{tmpfile.path}})
ansible.builtin.copy: src={{roles_path}}/openshift-apps/{{object_app}}/files/{{object_file}} dest=/etc/openshift_apps/{{object_os_app}}/{{object_objectname}}
when: object_file is defined and object_template is not defined and object_template_fullpath is not defined
register: object_file_result
- name: Call `oc apply` on the copied file
ansible.builtin.shell: oc -n {{object_os_app}} apply --validate=strict -f /etc/openshift_apps/{{object_os_app}}/{{object_objectname}}
when: object_template_result.changed or object_template_fullpath_result.changed or object_file_result.changed or object_always_apply