Skip to content

Commit

Permalink
fix: remove collection_list when action plugin is fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
gboutry committed Nov 3, 2022
1 parent a154b7b commit 12cc608
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ansible_mitogen/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,13 @@ def wrap_action_loader__get(name, *args, **kwargs):
action plugins outside the Ansible tree.
"""
get_kwargs = {'class_only': True}
if name in ('fetch',):
name = 'mitogen_' + name
if ansible.__version__ >= '2.8':
get_kwargs['collection_list'] = kwargs.pop('collection_list', None)

if name in ('fetch',):
name = 'mitogen_' + name
get_kwargs['collection_list'] = None

klass = ansible_mitogen.loaders.action_loader__get(name, **get_kwargs)
if klass:
bases = (ansible_mitogen.mixins.ActionModuleMixin, klass)
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Release Notes
To avail of fixes in an unreleased version, please download a ZIP file
`directly from GitHub <https://github.com/dw/mitogen/>`_.

v0.2.11dev0
-----------

* :gh:issue:`971` Fix ansible action plugin lookup when resolving fetch inside a collection


v0.2.10 (2021-10-28)
--------------------

Expand Down

0 comments on commit 12cc608

Please sign in to comment.