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

pkg5: wrap 'to modify' package list (#789)

* pkg5: wrap 'to modify' package list

Moved from https://github.com/ansible/ansible/pull/56378

* Add changelog fragment.

* Correct markup.

* Update changelogs/fragments/789-pkg5-wrap-to-modify-package-list.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Peter Oliver 2020-08-25 20:21:51 +01:00 committed by GitHub
parent 7e6bde2ce1
commit d4e9b7575c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "pkg5 - now works when Python 3 is used on the target (https://github.com/ansible-collections/community.general/pull/789)."

View file

@ -148,7 +148,7 @@ def ensure(module, state, packages, params):
else:
no_refresh = ['--no-refresh']
to_modify = filter(behaviour[state]['filter'], packages)
to_modify = list(filter(behaviour[state]['filter'], packages))
if to_modify:
rc, out, err = module.run_command(['pkg', behaviour[state]['subcommand']] + dry_run + accept_licenses + beadm + no_refresh + ['-q', '--'] + to_modify)
response['rc'] = rc