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

Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
pull/46507/merge
Adam Miller 6 years ago committed by ansibot
parent d3cc2f803a
commit ad405fc21e

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

@ -83,6 +83,16 @@
that: that:
- "not yum_result is changed" - "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 # INSTALL AGAIN WITH LATEST
- name: install sos again with state latest in check mode - name: install sos again with state latest in check mode
yum: name=sos state=latest yum: name=sos state=latest

Loading…
Cancel
Save