yum module handle list optional empty strings properly (#46634) (#46819)

* yum module handle list optional empty strings properly (#46634)

Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit ad405fc21e)

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
pull/46960/head
Adam Miller 7 years ago committed by Toshio Kuratomi
parent f3b5e0359f
commit 4fe7671d34

@ -0,0 +1,3 @@
---
minor_changes:
- fix yum module to handle list argument optional empty strings properly

@ -110,6 +110,9 @@ class YumDnf(with_metaclass(ABCMeta, object)):
some_list.extend(new_list)
if some_list == [""]:
return []
return some_list
@abstractmethod

@ -83,6 +83,16 @@
that:
- "not yum_result is changed"
- name: install sos again with empty string enablerepo
yum: name=sos state=present enablerepo=""
register: yum_result
- name: verify no change on third install with empty string enablerepo
assert:
that:
- "yum_result is success"
- "not yum_result is changed"
# INSTALL AGAIN WITH LATEST
- name: install sos again with state latest in check mode
yum: name=sos state=latest

Loading…
Cancel
Save