|
|
|
@ -1,19 +1,6 @@
|
|
|
|
|
# (c) 2015, Ansible Inc,
|
|
|
|
|
#
|
|
|
|
|
# This file is part of Ansible
|
|
|
|
|
#
|
|
|
|
|
# Ansible is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# Ansible is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
# Copyright: (c) 2015, Ansible Inc,
|
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
|
|
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
@ -64,7 +51,7 @@ class ActionModule(ActionBase):
|
|
|
|
|
play_context.connection = 'netconf'
|
|
|
|
|
play_context.port = int(self.provider['port'] or self._play_context.port or 830)
|
|
|
|
|
elif self.provider.get('transport') in ('nxapi', 'eapi') and play_context.network_os in ('nxos', 'eos'):
|
|
|
|
|
play_context.connection = play_context.connection
|
|
|
|
|
play_context.connection = 'local'
|
|
|
|
|
play_context.port = int(self.provider['port'] or self._play_context.port or 22)
|
|
|
|
|
else:
|
|
|
|
|
play_context.connection = 'network_cli'
|
|
|
|
|