summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/dnf/tasks/test_sos_removal.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
commit8a754e0858d922e955e71b253c139e071ecec432 (patch)
tree527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/dnf/tasks/test_sos_removal.yml
parentInitial commit. (diff)
downloadansible-core-8a754e0858d922e955e71b253c139e071ecec432.tar.xz
ansible-core-8a754e0858d922e955e71b253c139e071ecec432.zip
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/targets/dnf/tasks/test_sos_removal.yml')
-rw-r--r--test/integration/targets/dnf/tasks/test_sos_removal.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/integration/targets/dnf/tasks/test_sos_removal.yml b/test/integration/targets/dnf/tasks/test_sos_removal.yml
new file mode 100644
index 0000000..40ceb62
--- /dev/null
+++ b/test/integration/targets/dnf/tasks/test_sos_removal.yml
@@ -0,0 +1,19 @@
+# These are safe to just check in check_mode, because in the module, the
+# logic to match packages will happen anyway. check_mode will just prevent
+# the transaction from actually running once the matches are found.
+- name: Remove {{ item }}
+ dnf:
+ name: "{{ item }}"
+ state: absent
+ check_mode: true
+ register: sos_rm
+
+- debug:
+ var: sos_rm
+
+- assert:
+ that:
+ - sos_rm is successful
+ - sos_rm is changed
+ - "'Removed: sos-{{ sos_version }}-{{ sos_release }}' in sos_rm.results[0]"
+ - sos_rm.results|length == 1