mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
18 lines
680 B
YAML
18 lines
680 B
YAML
---
|
|
- name: Checking {{ application_name }} pod is in running state
|
|
shell: kubectl get pods -n {{ app_ns }} -o jsonpath='{.items[?(@.metadata.labels.{{app_lkey}}=="{{app_lvalue}}")].status.phase}'
|
|
register: result
|
|
until: "((result.stdout.split()|unique)|length) == 1 and 'Running' in result.stdout"
|
|
delay: 3
|
|
retries: 60
|
|
|
|
- name: Get the container status of application.
|
|
shell: >
|
|
kubectl get pod -n {{ app_ns }} -l {{app_lkey}}="{{app_lvalue}}"
|
|
-o custom-columns=:..containerStatuses[].state --no-headers | grep -w "running"
|
|
args:
|
|
executable: /bin/bash
|
|
register: containerStatus
|
|
until: "'running' in containerStatus.stdout"
|
|
delay: 3
|
|
retries: 60
|