Skip to content

Commit

Permalink
Enable some debugging on failure
Browse files Browse the repository at this point in the history
The content built in the variables might fail - and if does, it's
usually really hard to understand the issue, since ansible doesn't
output anything.

This patch allows to at last know what dataset is consumed by the
parameter build code, while ensure it still fails (rescue clears the
host errors).
  • Loading branch information
cjeanner authored and openshift-merge-bot[bot] committed Jun 28, 2024
1 parent e8c99f9 commit ff6a9d2
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions roles/libvirt_manager/tasks/generate_networking_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@
{% endif %}
{% endif %}
block:
- name: Expose _dataset
ansible.builtin.debug:
msg: "{{ _dataset }}"

- name: Expose patch for networking_mapper
vars:
_filtered: >-
Expand All @@ -205,6 +201,20 @@
cifmw_networking_mapper_definition_patch_01_libvirt: >-
{{ _filtered }}
rescue:
- name: Failure detected - output _network_data
ansible.builtin.debug:
var: _network_data

- name: Failure detected - output _match
ansible.builtin.debug:
var: _match

- name: Finally fail for goof
ansible.builtin.fail:
msg: >-
Failure detected. Check the debug outputs above
- name: Save networking_mapper patch
ansible.builtin.copy:
dest: >-
Expand Down

0 comments on commit ff6a9d2

Please sign in to comment.