mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 22:02:53 +00:00
Merge pull request #598 from shanemcd/show-me-the-errors
Surface any errors that happen while launching demo jt in tests
This commit is contained in:
@@ -18,11 +18,39 @@
|
|||||||
name: example-awx-admin-password
|
name: example-awx-admin-password
|
||||||
register: admin_pw_secret
|
register: admin_pw_secret
|
||||||
|
|
||||||
- name: Launch Demo Job Template
|
- block:
|
||||||
awx.awx.job_launch:
|
- name: Launch Demo Job Template
|
||||||
name: Demo Job Template
|
awx.awx.job_launch:
|
||||||
wait: yes
|
name: Demo Job Template
|
||||||
validate_certs: no
|
wait: yes
|
||||||
controller_host: localhost
|
validate_certs: no
|
||||||
controller_username: admin
|
controller_host: localhost
|
||||||
controller_password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
controller_username: admin
|
||||||
|
controller_password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||||
|
rescue:
|
||||||
|
- name: Get list of project updates and jobs
|
||||||
|
uri:
|
||||||
|
url: "http://localhost/api/v2/{{ item }}/"
|
||||||
|
user: admin
|
||||||
|
password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||||
|
force_basic_auth: yes
|
||||||
|
register: job_lists
|
||||||
|
loop:
|
||||||
|
- project_updates
|
||||||
|
- jobs
|
||||||
|
|
||||||
|
- name: Get all job and project details
|
||||||
|
uri:
|
||||||
|
url: "http://localhost{{ item }}"
|
||||||
|
user: admin
|
||||||
|
password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||||
|
force_basic_auth: yes
|
||||||
|
loop: |
|
||||||
|
{{ job_lists.results | map(attribute='json') | map(attribute='results') | flatten | map(attribute='url') }}
|
||||||
|
|
||||||
|
- name: Re-emit failure
|
||||||
|
vars:
|
||||||
|
failed_task:
|
||||||
|
result: '{{ ansible_failed_result }}'
|
||||||
|
fail:
|
||||||
|
msg: '{{ failed_task }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user