-
Notifications
You must be signed in to change notification settings - Fork 596
/
verify.yml
58 lines (52 loc) 路 1.49 KB
/
verify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
- name: Verify
hosts: localhost
connection: local
gather_facts: no
collections:
- kubernetes.core
vars:
ctrl_label: control-plane=controller-manager
tasks:
- name: Perform awx tests
block:
- name: Import all test files from tasks/
ansible.builtin.include_tasks: '{{ item }}'
with_fileglob:
- tasks/awx_test.yml
- tasks/awx_replicas_test.yml
tags:
- always
rescue:
- name: Create debug output directory
ansible.builtin.file:
path: '{{ debug_output_dir }}'
state: directory
tags:
- always
- name: Gather and output K8s resources
ansible.builtin.include_tasks: utils/output_k8s_resources.yml
tags:
- always
- name: Get all pods
kubernetes.core.k8s_info:
api_version: v1
kind: Pod
namespace: '{{ namespace }}'
register: all_pods
tags:
- always
- name: Get all container logs for all pods
ansible.builtin.include_tasks: utils/output_all_container_logs_for_pod.yml
loop: '{{ all_pods.resources }}'
ignore_errors: yes
tags:
- always
- name: Re-emit failure
vars:
failed_task:
result: '{{ ansible_failed_result }}'
ansible.builtin.fail:
msg: '{{ failed_task }}'
tags:
- always