mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
yum: fix reporting group changes in check_mode (#28331)
This commit is contained in:
@@ -255,7 +255,7 @@
|
||||
state: present
|
||||
register: yum_result
|
||||
|
||||
- name: verify nothing changed
|
||||
- name: verify sos is installed
|
||||
assert:
|
||||
that:
|
||||
- "yum_result.rc == 0"
|
||||
@@ -269,6 +269,25 @@
|
||||
- "'rc' in yum_result"
|
||||
- "'results' in yum_result"
|
||||
|
||||
- name: try to install the group again, with --check to check 'changed'
|
||||
yum:
|
||||
name: "@Development Tools"
|
||||
state: present
|
||||
check_mode: yes
|
||||
register: yum_result
|
||||
|
||||
- name: verify nothing changed
|
||||
assert:
|
||||
that:
|
||||
- "not yum_result.changed"
|
||||
|
||||
- name: verify yum module outputs
|
||||
assert:
|
||||
that:
|
||||
- "'changed' in yum_result"
|
||||
- "'msg' in yum_result"
|
||||
- "'results' in yum_result"
|
||||
|
||||
- name: try to install non existing group
|
||||
yum:
|
||||
name: "@non-existing-group"
|
||||
|
||||
Reference in New Issue
Block a user