From f8157d579abd9ca5a599f4449ad7008b6ed6edb3 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Wed, 22 Feb 2017 12:47:21 -0500 Subject: [PATCH] fixes error where a transport is not set for nxos (#21790) Will now make sure transport is set to `cli` --- lib/ansible/plugins/action/nxos.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/plugins/action/nxos.py b/lib/ansible/plugins/action/nxos.py index 5637360808d..51b5215302b 100644 --- a/lib/ansible/plugins/action/nxos.py +++ b/lib/ansible/plugins/action/nxos.py @@ -97,6 +97,10 @@ class ActionModule(_ActionModule): } self._task.args['provider'] = provider_arg + # make sure a transport value is set in args + if self._task.args.get('transport') is None and self._task.args.get('provider').get('transport') is None: + self._task.args['transport'] = 'cli' + return super(ActionModule, self).run(tmp, task_vars) def _get_socket_path(self, play_context):