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

Fix incorrect line wrapping in output from yum check-updates

https://github.com/ansible/ansible-modules-core/issues/4318#issuecomment-251416661
This commit is contained in:
Filip Hubík 2016-10-05 11:06:05 +02:00 committed by Matt Clay
parent 7a3d93b9f6
commit 9a2d8337f2

View file

@ -800,6 +800,8 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos):
res['results'].append('Nothing to do here, all packages are up to date')
return res
elif rc == 100:
# remove incorrect new lines in longer columns in output from yum check-update
out=re.sub('\n\W+', ' ', out)
available_updates = out.split('\n')
# build update dictionary
for line in available_updates: