diff --git a/molecule/default/tasks/awx_test.yml b/molecule/default/tasks/awx_test.yml index 35e9b9d22..68c1cbcd4 100644 --- a/molecule/default/tasks/awx_test.yml +++ b/molecule/default/tasks/awx_test.yml @@ -138,6 +138,10 @@ controller_username: admin controller_password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}" + - name: TEST inject failure + fail: + msg: "TEST inject failure" + rescue: - name: Create debug output directory ansible.builtin.file: @@ -163,7 +167,7 @@ dest: "{{ debug_output_dir }}/job_lists.json" when: store_debug_output | default(false) - - name: Get all job and project details + - name: Get all job and project_update details uri: url: "http://localhost{{ endpoint }}" user: admin @@ -181,6 +185,38 @@ dest: "{{ debug_output_dir }}/job_details.json" when: store_debug_output | default(false) + - name: Get list of instances + uri: + url: "http://localhost/awx/api/v2/instances" + user: admin + password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}" + force_basic_auth: yes + register: instances_list + + - name: Store instance_list debug output + copy: + content: "{{ instances_list | to_nice_json }}" + dest: "{{ debug_output_dir }}/instances_list.json" + when: store_debug_output | default(false) + + - name: Get instances detail + uri: + url: "http://localhost{{ item }}" + user: admin + password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}" + force_basic_auth: yes + loop: | + {{ instances_list.results | map(attribute='json') | map(attribute='results') | flatten | map(attribute='url') }} + loop_control: + loop_var: item + register: instances_details + + - name: Store instances_details debug output + copy: + content: "{{ instances_details | to_nice_json }}" + dest: "{{ debug_output_dir }}/instances_details.json" + when: store_debug_output | default(false) + ## TODO: figure out why this doesn't work # - name: Store debug outputs # copy: