mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 04:41:26 -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
19
lib/ansible/module_utils/compat/paramiko.py
Normal file
19
lib/ansible/module_utils/compat/paramiko.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2019 Ansible Project
|
||||
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
PARAMIKO_IMPORT_ERR = None
|
||||
|
||||
paramiko = None
|
||||
try:
|
||||
import paramiko
|
||||
except ImportError:
|
||||
try:
|
||||
import ansible_paramiko as paramiko
|
||||
except (ImportError, AttributeError) as err: # paramiko and gssapi are incompatible and raise AttributeError not ImportError
|
||||
PARAMIKO_IMPORT_ERR = err
|
||||
except AttributeError as err: # paramiko and gssapi are incompatible and raise AttributeError not ImportError
|
||||
PARAMIKO_IMPORT_ERR = err
|
Loading…
Add table
Add a link
Reference in a new issue