diff --git a/ansible/roles_ocp_workloads/ocp4_workload_showroom/tasks/deploy-showroom-helm-zerotouch.yaml b/ansible/roles_ocp_workloads/ocp4_workload_showroom/tasks/deploy-showroom-helm-zerotouch.yaml index 08541042a6b..655b8871a13 100644 --- a/ansible/roles_ocp_workloads/ocp4_workload_showroom/tasks/deploy-showroom-helm-zerotouch.yaml +++ b/ansible/roles_ocp_workloads/ocp4_workload_showroom/tasks/deploy-showroom-helm-zerotouch.yaml @@ -257,38 +257,41 @@ {% if r_pod_status.resources | length > 0 and r_pod_status.resources[0].status.initContainerStatuses is defined %} Init Containers: + ------------------------------------------------------------------------ {% for container in r_pod_status.resources[0].status.initContainerStatuses %} - {{ container.name }}: Ready: {{ container.ready | default(false) }} Restarts: {{ container.restartCount | default(0) }} State: {{ container.state.keys() | list | first | default('unknown') }} - {% if container.state.waiting is defined %} + {% if container.state.waiting is defined %} Waiting Reason: {{ container.state.waiting.reason | default('N/A') }} Waiting Message: {{ container.state.waiting.message | default('N/A') }} - {% endif %} - {% if container.state.terminated is defined %} + {% endif %} + {% if container.state.terminated is defined %} Terminated Reason: {{ container.state.terminated.reason | default('N/A') }} Terminated Message: {{ container.state.terminated.message | default('N/A') }} Exit Code: {{ container.state.terminated.exitCode | default('N/A') }} - {% endif %} + {% endif %} {% endfor %} {% endif %} {% if r_pod_status.resources | length > 0 and r_pod_status.resources[0].status.containerStatuses is defined %} + Main Containers: + ------------------------------------------------------------------------ {% for container in r_pod_status.resources[0].status.containerStatuses %} - {{ container.name }}: Ready: {{ container.ready | default(false) }} Restarts: {{ container.restartCount | default(0) }} State: {{ container.state.keys() | list | first | default('unknown') }} - {% if container.state.waiting is defined %} + {% if container.state.waiting is defined %} Waiting Reason: {{ container.state.waiting.reason | default('N/A') }} Waiting Message: {{ container.state.waiting.message | default('N/A') }} - {% endif %} - {% if container.state.terminated is defined %} + {% endif %} + {% if container.state.terminated is defined %} Terminated Reason: {{ container.state.terminated.reason | default('N/A') }} Terminated Message: {{ container.state.terminated.message | default('N/A') }} Exit Code: {{ container.state.terminated.exitCode | default('N/A') }} - {% endif %} + {% endif %} {% endfor %} {% else %} - No container status information available @@ -297,11 +300,11 @@ FULL POD INFORMATION (YAML): ======================================================================== - {{ r_pod_full_info.resources[0] | to_nice_yaml + {{ (r_pod_full_info.resources[0] | to_nice_yaml if (r_pod_full_info is defined and r_pod_full_info.resources | length > 0) else (r_pod_status.resources[0] | to_nice_yaml if r_pod_status.resources | length > 0 - else 'Pod information not available') }} + else 'Pod information not available')) | indent(6, false) }} CONTAINER LOGS: ========================================================================