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:
parent
7e6bde2ce1
commit
d4e9b7575c
2 changed files with 3 additions and 1 deletions
|
@ -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)."
|
|
@ -148,7 +148,7 @@ def ensure(module, state, packages, params):
|
||||||
else:
|
else:
|
||||||
no_refresh = ['--no-refresh']
|
no_refresh = ['--no-refresh']
|
||||||
|
|
||||||
to_modify = filter(behaviour[state]['filter'], packages)
|
to_modify = list(filter(behaviour[state]['filter'], packages))
|
||||||
if to_modify:
|
if to_modify:
|
||||||
rc, out, err = module.run_command(['pkg', behaviour[state]['subcommand']] + dry_run + accept_licenses + beadm + no_refresh + ['-q', '--'] + 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
|
response['rc'] = rc
|
||||||
|
|
Loading…
Reference in a new issue