diff --git a/changelogs/fragments/paramiko-optional.yaml b/changelogs/fragments/paramiko-optional.yaml new file mode 100644 index 00000000000..142df87ee31 --- /dev/null +++ b/changelogs/fragments/paramiko-optional.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - paramiko is now optional. There is no compat package on certain platforms to worry about. diff --git a/lib/ansible/module_utils/compat/paramiko.py b/lib/ansible/module_utils/compat/paramiko.py index 12d75dd5ccc..89080572f45 100644 --- a/lib/ansible/module_utils/compat/paramiko.py +++ b/lib/ansible/module_utils/compat/paramiko.py @@ -10,10 +10,5 @@ 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 +except (ImportError, AttributeError) as err: # paramiko and gssapi are incompatible and raise AttributeError not ImportError PARAMIKO_IMPORT_ERR = err