mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
---
|
|
- name: Verify cluster resources
|
|
hosts: localhost
|
|
connection: local
|
|
|
|
vars:
|
|
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
|
|
|
tasks:
|
|
- name: Get AWX Kind data
|
|
k8s_info:
|
|
api_version: awx.ansible.com/v1beta1
|
|
kind: AWX
|
|
namespace: example-awx
|
|
label_selectors:
|
|
- "app.kubernetes.io/name=example-awx"
|
|
- "app.kubernetes.io/part-of=example-awx"
|
|
- "app.kubernetes.io/managed-by=awx-operator"
|
|
- "app.kubernetes.io/component=awx"
|
|
register: awx_kind
|
|
|
|
- name: Verify there is one AWX kind
|
|
assert:
|
|
that: '{{ (awx_kind.resources | length) == 1 }}'
|
|
|
|
- name: Get AWX Pod data
|
|
k8s_info:
|
|
kind: Pod
|
|
namespace: example-awx
|
|
label_selectors:
|
|
- "app.kubernetes.io/name=example-awx"
|
|
- "app.kubernetes.io/part-of=example-awx"
|
|
- "app.kubernetes.io/managed-by=awx-operator"
|
|
- "app.kubernetes.io/component=awx"
|
|
register: tower_pods
|
|
|
|
- name: Verify there is one AWX pod
|
|
assert:
|
|
that: '{{ (tower_pods.resources | length) == 1 }}'
|