Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change sub_plugin check to completely ignore napalm #59298

Merged
merged 1 commit into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ansible/executor/task_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ def _get_persistent_connection_options(self, connection, variables, templar):

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 = {}
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/plugins/connection/napalm.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _connect(self):

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

Expand Down