mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-08 02:01:31 -07:00
Change default smart connection to ssh on macOS and remove paramiko from requirements.txt (#54738)
* Remove default use of paramiko connection plugin on macOS This fix was originally to work around a bug that caused a kernel panic on macOS that has since been fixed. * Remove paramiko from requirements.txt * Move paramiko checking to common place * Drop the warnings obfiscation code * Update pip installation instructions to reflect upstream instructions * Fix tests on CentOS 6 (Python 2.6) that now show Python deprecation warnings * Add changelog fragment
This commit is contained in:
parent
9776037abe
commit
6ce9cf7741
13 changed files with 92 additions and 104 deletions
|
@ -206,6 +206,7 @@ from copy import deepcopy
|
|||
import collections
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.compat.paramiko import paramiko
|
||||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
from ansible.module_utils.network.iosxr.iosxr import get_config, load_config, is_netconf, is_cliconf
|
||||
from ansible.module_utils.network.iosxr.iosxr import iosxr_argument_spec, build_xml, etree_findall
|
||||
|
@ -216,15 +217,6 @@ try:
|
|||
except ImportError:
|
||||
HAS_B64 = False
|
||||
|
||||
HAS_PARAMIKO = True
|
||||
try:
|
||||
import paramiko
|
||||
except ImportError:
|
||||
try:
|
||||
import ansible_paramiko as paramiko
|
||||
except ImportError:
|
||||
HAS_PARAMIKO = False
|
||||
|
||||
|
||||
class PublicKeyManager(object):
|
||||
def __init__(self, module, result):
|
||||
|
@ -693,7 +685,7 @@ def main():
|
|||
msg='library base64 is required but does not appear to be '
|
||||
'installed. It can be installed using `pip install base64`'
|
||||
)
|
||||
if not HAS_PARAMIKO:
|
||||
if paramiko is None:
|
||||
module.fail_json(
|
||||
msg='library paramiko is required but does not appear to be '
|
||||
'installed. It can be installed using `pip install paramiko`'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue