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

apt: strip whitespaces in package names (#55750)

Fixes #55741
This commit is contained in:
Martin Krizek 2019-04-25 15:29:27 +02:00 committed by René Moser
parent 2250257809
commit 1a6df99aa5
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -1129,7 +1129,7 @@ def main():
force=force_yes, dpkg_options=p['dpkg_options']) force=force_yes, dpkg_options=p['dpkg_options'])
unfiltered_packages = p['package'] or () 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 all_installed = '*' in unfiltered_packages
latest = p['state'] == 'latest' latest = p['state'] == 'latest'