diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index f453ddb819..7e7000563b 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -942,7 +942,7 @@ class TaskExecutor: option_vars = C.config.get_plugin_vars('connection', connection._load_name) plugin = connection._sub_plugin - if plugin['type'] != 'external': + if plugin.get('type'): option_vars.extend(C.config.get_plugin_vars(plugin['type'], plugin['name'])) options = {} diff --git a/lib/ansible/plugins/connection/napalm.py b/lib/ansible/plugins/connection/napalm.py index 22ebd4df2e..c7b13a7b5a 100644 --- a/lib/ansible/plugins/connection/napalm.py +++ b/lib/ansible/plugins/connection/napalm.py @@ -183,7 +183,7 @@ class Connection(NetworkConnectionBase): self.napalm.open() - self._sub_plugin = {'type': 'external', 'name': 'napalm', 'obj': self.napalm} + self._sub_plugin = {'name': 'napalm', 'obj': self.napalm} self.queue_message('vvvv', 'created napalm device for network_os %s' % self._network_os) self._connected = True