ansible/roles/openshift-apps/koschei/job/tasks/main.yml
Ryan Lerch 3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

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

14 lines
625 B
YAML

---
- name: Copy job template to a temporary file
template:
src: "{{roles_path}}/openshift-apps/{{job_app}}/templates/job.yml"
dest: "/etc/openshift_apps/{{job_app}}/job-{{job_name}}.yml"
- name: Delete previous job (if any)
ansible.builtin.shell: oc -n {{ job_app }} delete --ignore-not-found=true -f /etc/openshift_apps/{{job_app}}/job-{{job_name}}.yml
- name: Start job
ansible.builtin.shell: oc -n {{ job_app }} create -f /etc/openshift_apps/{{job_app}}/job-{{job_name}}.yml
- name: Wait for job to complete
ansible.builtin.shell: oc -n {{ job_app }} wait job/job-{{job_name}} --for condition=complete