mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
yum: fix reporting group changes in check_mode (#28331)
This commit is contained in:
parent
84005498bc
commit
711ae03845
2 changed files with 33 additions and 3 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue