Skip to content

Commit

Permalink
Added a workaround for this bug\nhttps://github.com/ansible-collectio…
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaerum committed Jul 25, 2021
1 parent 7472201 commit 434f8d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions roles/patch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@
command: trizen -Sy --aur --noconfirm
register: _result_trizen
failed_when:
- _result_trizen | json_query(filter) | count > 0 or _result_trizen.rc != 0
# the workaround is to added 'to_json | from_json' and when it work (it is magic)
- _result_trizen | to_json | from_json | json_query(filter) | count > 0 or _result_trizen.rc != 0
vars:
filter: "stdout_lines[?contains(@, 'Error! Bad return status for module build on kernel')]"

# TODO: remove this when the filter has been confirmed to work
- name: Install ZFS packages - Trizen (debug)
debug:
var:
- _result_trizen | json_query(filter) | count > 0
# the workaround is to added 'to_json | from_json' and when it work (it is magic)
- _result_trizen | to_json | from_json | json_query(filter) | count > 0
- _result_trizen.rc != 0
vars:
filter: "stdout_lines[?contains(@, 'Error! Bad return status for module build on kernel')]"
Expand Down

0 comments on commit 434f8d8

Please sign in to comment.