apt: strip whitespaces in package names (#55750)

Fixes #55741
pull/55765/head
Martin Krizek 6 years ago committed by René Moser
parent 2250257809
commit 1a6df99aa5

@ -0,0 +1,2 @@
bugfixes:
- apt - strip whitespaces in package names (https://github.com/ansible/ansible/issues/55741)

@ -1129,7 +1129,7 @@ def main():
force=force_yes, dpkg_options=p['dpkg_options'])
unfiltered_packages = p['package'] or ()
packages = [package for package in unfiltered_packages if package != '*']
packages = [package.strip() for package in unfiltered_packages if package != '*']
all_installed = '*' in unfiltered_packages
latest = p['state'] == 'latest'

Loading…
Cancel
Save