mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-28 18:34:42 +00:00
@@ -37,19 +37,25 @@
|
|||||||
k8s:
|
k8s:
|
||||||
definition: "{{ job_definition }}"
|
definition: "{{ job_definition }}"
|
||||||
|
|
||||||
- name: Test that job's pod is running
|
- name: Wait Job's pod
|
||||||
k8s_info:
|
k8s_info:
|
||||||
kind: Pod
|
kind: Pod
|
||||||
namespace: "{{ gc_namespace }}"
|
namespace: "{{ gc_namespace }}"
|
||||||
label_selectors:
|
label_selectors:
|
||||||
- "job=gc"
|
- "job=gc"
|
||||||
wait: yes
|
register: wait_job
|
||||||
wait_timeout: 100
|
until: wait_job.resources
|
||||||
register: job
|
|
||||||
until: job.resources[0].status.phase == "Running"
|
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
|
|
||||||
|
- name: Wait job's pod running
|
||||||
|
k8s_info:
|
||||||
|
kind: Pod
|
||||||
|
namespace: "{{ gc_namespace }}"
|
||||||
|
name: "{{ wait_job.resources[0].metadata.name }}"
|
||||||
|
wait: yes
|
||||||
|
register: job
|
||||||
|
|
||||||
- name: Assert job's pod is running
|
- name: Assert job's pod is running
|
||||||
assert:
|
assert:
|
||||||
that: job.resources[0].status.phase == "Running"
|
that: job.resources[0].status.phase == "Running"
|
||||||
@@ -81,19 +87,25 @@
|
|||||||
k8s:
|
k8s:
|
||||||
definition: "{{ job_definition }}"
|
definition: "{{ job_definition }}"
|
||||||
|
|
||||||
- name: Test that job's pod is running
|
- name: Wait Job's pod
|
||||||
k8s_info:
|
k8s_info:
|
||||||
kind: Pod
|
kind: Pod
|
||||||
namespace: "{{ gc_namespace }}"
|
namespace: "{{ gc_namespace }}"
|
||||||
label_selectors:
|
label_selectors:
|
||||||
- "job=gc"
|
- "job=gc"
|
||||||
wait: yes
|
register: wait_job
|
||||||
wait_timeout: 100
|
until: wait_job.resources
|
||||||
register: job
|
|
||||||
until: job.resources[0].status.phase == "Running"
|
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
|
|
||||||
|
- name: Wait job's pod running
|
||||||
|
k8s_info:
|
||||||
|
kind: Pod
|
||||||
|
namespace: "{{ gc_namespace }}"
|
||||||
|
name: "{{ wait_job.resources[0].metadata.name }}"
|
||||||
|
wait: yes
|
||||||
|
register: job
|
||||||
|
|
||||||
- name: Assert job's pod is running
|
- name: Assert job's pod is running
|
||||||
assert:
|
assert:
|
||||||
that: job.resources[0].status.phase == "Running"
|
that: job.resources[0].status.phase == "Running"
|
||||||
@@ -126,19 +138,25 @@
|
|||||||
k8s:
|
k8s:
|
||||||
definition: "{{ job_definition }}"
|
definition: "{{ job_definition }}"
|
||||||
|
|
||||||
- name: Test that job's pod is running
|
- name: Wait Job's pod
|
||||||
k8s_info:
|
k8s_info:
|
||||||
kind: Pod
|
kind: Pod
|
||||||
namespace: "{{ gc_namespace }}"
|
namespace: "{{ gc_namespace }}"
|
||||||
label_selectors:
|
label_selectors:
|
||||||
- "job=gc"
|
- "job=gc"
|
||||||
wait: yes
|
register: wait_job
|
||||||
wait_timeout: 100
|
until: wait_job.resources
|
||||||
register: job
|
|
||||||
until: job.resources[0].status.phase == "Running"
|
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
|
|
||||||
|
- name: Wait job's pod running
|
||||||
|
k8s_info:
|
||||||
|
kind: Pod
|
||||||
|
namespace: "{{ gc_namespace }}"
|
||||||
|
name: "{{ wait_job.resources[0].metadata.name }}"
|
||||||
|
wait: yes
|
||||||
|
register: job
|
||||||
|
|
||||||
- name: Assert job's pod is running
|
- name: Assert job's pod is running
|
||||||
assert:
|
assert:
|
||||||
that: job.resources[0].status.phase == "Running"
|
that: job.resources[0].status.phase == "Running"
|
||||||
|
|||||||
Reference in New Issue
Block a user