mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-01 20:50:23 -07:00
Remove provider (and transport, where applicable) from consideration when not using connection=local (#39555)
* Remove provider (and transport, where applicable) from consideration * Add tests that misplaced transport does not fail task
This commit is contained in:
parent
384a0d8b01
commit
c6270e15a6
14 changed files with 48 additions and 2 deletions
|
@ -95,7 +95,8 @@ class ActionModule(ActionBase):
|
|||
else:
|
||||
provider = self._task.args.get('provider', {})
|
||||
if any(provider.values()):
|
||||
display.warning('provider is unnecessary when using connection=%s and will be ignored' % play_context.connection)
|
||||
display.warning('provider is unnecessary when using %s and will be ignored' % play_context.connection)
|
||||
del self._task.args['provider']
|
||||
|
||||
if play_context.connection == 'network_cli':
|
||||
# make sure we are in the right cli context which should be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue