Replaces references to shell: with ansible.builtin.shell Signed-off-by: Ryan Lerch <rlerch@redhat.com>
14 lines
625 B
YAML
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
|