1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
Adam Miller 2018-10-10 17:49:24 -05:00 committed by ansibot
parent d3cc2f803a
commit ad405fc21e
2 changed files with 13 additions and 0 deletions

View file

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

View file

@ -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