Files
ansible-collections-openstack/ci/roles/logging/tasks/main.yaml
Jakob Meng d0ac32eefd Refactored integration test of openstacksdk logging feature
Instead of asserting that openstacksdk created a logging file,
we read the contents of that log file now. The benefit is, that
this integration test gives users an idea how to actually use the
logging feature and also read the contents of the log file.

Change-Id: I9e3c75dda4c1c920937c9780fbdcbe3caeb4d6ad
2022-11-09 14:35:09 +01:00

16 lines
414 B
YAML

---
- name: Trigger flavor listing to create logs
openstack.cloud.compute_flavor_info:
cloud: "{{ cloud }}"
sdk_log_path: "{{ sdk_log_file_path }}"
sdk_log_level: "DEBUG"
- name: Read openstacksdk's log file
ansible.builtin.slurp:
src: "{{ sdk_log_file_path }}"
register: log
- name: Print contents of openstacksdk's log
ansible.builtin.debug:
msg: "{{ log['content'] | b64decode }}"