mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Improve logging in CI (#1868)
- Set AWX log level to DEBUG - Fix failure to collect awx API output
This commit is contained in:
@@ -139,6 +139,11 @@
|
|||||||
controller_password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
controller_password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
|
- name: Create debug output directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: '{{ debug_output_dir }}'
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Get list of project updates and jobs
|
- name: Get list of project updates and jobs
|
||||||
uri:
|
uri:
|
||||||
url: "http://localhost/awx/api/v2/{{ resource }}/"
|
url: "http://localhost/awx/api/v2/{{ resource }}/"
|
||||||
@@ -158,7 +163,7 @@
|
|||||||
dest: "{{ debug_output_dir }}/job_lists.json"
|
dest: "{{ debug_output_dir }}/job_lists.json"
|
||||||
when: store_debug_output | default(false)
|
when: store_debug_output | default(false)
|
||||||
|
|
||||||
- name: Get all job and project details
|
- name: Get all job and project_update details
|
||||||
uri:
|
uri:
|
||||||
url: "http://localhost{{ endpoint }}"
|
url: "http://localhost{{ endpoint }}"
|
||||||
user: admin
|
user: admin
|
||||||
@@ -176,6 +181,38 @@
|
|||||||
dest: "{{ debug_output_dir }}/job_details.json"
|
dest: "{{ debug_output_dir }}/job_details.json"
|
||||||
when: store_debug_output | default(false)
|
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 instances_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.json.results | 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
|
## TODO: figure out why this doesn't work
|
||||||
# - name: Store debug outputs
|
# - name: Store debug outputs
|
||||||
# copy:
|
# copy:
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ spec:
|
|||||||
additional_labels:
|
additional_labels:
|
||||||
- my/team
|
- my/team
|
||||||
- my/service
|
- my/service
|
||||||
|
extra_settings:
|
||||||
|
- setting: LOG_AGGREGATOR_LEVEL
|
||||||
|
value: "'DEBUG'"
|
||||||
{% if additional_fields is defined %}
|
{% if additional_fields is defined %}
|
||||||
{{ additional_fields | to_nice_yaml | indent(2) }}
|
{{ additional_fields | to_nice_yaml | indent(2) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user