Closed geerlingguy closed 4 years ago
Even better, I can wait until all the total_count
jobs are 'successful':
- name: Wait until there are {{ total_count }} completed jobs.
community.kubernetes.k8s_info:
api_version: batch/v1
kind: Job
namespace: default
field_selectors:
- status.successful=1
register: job_list
until: (job_list.resources | length) == total_count
retries: 200
delay: 3
As the title says; add a task at the end, maybe using
k8s_info
, that grabs the total count of jobs in the default namespace, and verifies it is equal tototal_count
.