Debian Codegraph @

test/integration/targets/dnf/tasks/test_sos_removal.yml

raw
1 # These are safe to just check in check_mode, because in the module, the
2 # logic to match packages will happen anyway. check_mode will just prevent
3 # the transaction from actually running once the matches are found.
4 - name: Remove {{ item }}
5 dnf:
6 name: "{{ item }}"
7 state: absent
8 check_mode: true
9 register: sos_rm
10
11 - debug:
12 var: sos_rm
13
14 - assert:
15 that:
16 - sos_rm is successful
17 - sos_rm is changed
18 - |
19 sos_rm.results|select("contains", "Removed: sos-" ~ sos_version ~ "-" ~ sos_release) | length > 0
20 - sos_rm.results|length > 0