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) (#911)

* 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>
(cherry picked from commit d4e9b7575c)

Co-authored-by: Peter Oliver <github.com@mavit.org.uk>
This commit is contained in:
patchback[bot] 2020-09-17 19:29:44 +02:00 committed by GitHub
parent 496218b6e6
commit 79616f47cb
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