"paramiko" is not installing on redhat

venom69

New Member
Joined
Oct 20, 2023
Messages
2
Reaction score
0
Credits
18
Hello,

I have a offline environment and I am trying to run a playbook that will ping all my cisco IOS switches. When I run my playbook:
Code:
TASK [Check Boot path] *************************************************************************************
[WARNING]: ansible-pylibssh not installed, falling back to paramiko
fatal: [r1]: FAILED! => {"changed": false, "msg": "paramiko is not installed: No module named 'paramiko'"}


I thought I could install this maramiko,

python -m pip install paramiko-3.3.1-py3-none-any.whl
Processing ./paramiko-3.3.1-py3-none-any.whl


Code:
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f58e5e3c910>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pynacl/
ERROR: Could not find a version that satisfies the requirement pynacl>=1.5 (from paramiko) (from versions: none)
ERROR: No matching distribution found for pynacl>=1.5

any idea?

My ansible play is this:

Code:
---
- hosts: switches
  gather_facts: false
  connection: network_cli
  #vars_files: pass_keys.yml

  tasks:
    - name: Check show boot for switches
      block:
        - name: Check Boot path
          ios_command:
            commands:
              - 'show clock'
          register: show_clock
        - debug: var=show_clock.stdout[0]

#        - name: Check Boot path
#          ios_command:
#            commands:
#              - 'show boot | i BOOT'
#          register: show_boot
#        - debug: var=show_boot.stdout[0]
#
#        - name: Check Boot path
#          ios_command:
#            commands:
#              - 'dir'
#          register: show_flash
#        - debug: var=show_flash.stdout_lines[0]


##########
    - debug: msg="Print me if you can get to this line!"
      run_once: true
 


ERROR: No matching distribution found for pynacl>=1.5
It can't find a version of those dependency requirements that matches the above so it can't install paramiko.
 
Code:
 pip install PyNaCl==1.5.0
Looking in indexes: https://mymachine/PIP/simple/
Requirement already satisfied: PyNaCl==1.5.0 in /opt/anaconda3/lib/python3.10/site-packages (1.5.0)
Requirement already satisfied: cffi>=1.4.1 in /opt/anaconda3/lib/python3.10/site-packages (from PyNaCl==1.5.0) (1.15.1)
Requirement already satisfied: pycparser in /opt/anaconda3/lib/python3.10/site-packages (from cffi>=1.4.1->PyNaCl==1.5.0) (2.21)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: There was an error checking the latest version of pip.

It looks like its installed but i still cant run the play


When i run a -vvv:

Code:
The full traceback is:
  File "/usr/lib/python3.11/site-packages/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py", line 61, in get_capabilities
    capabilities = Connection(module._socket_path).get_capabilities()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ansible/module_utils/connection.py", line 200, in __rpc__
    raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [r1]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "commands": [
                "show clock"
            ],
            "interval": 1,
            "match": "all",
            "retries": 10,
            "wait_for": null
        }
    },
    "msg": "paramiko is not installed: No module named 'paramiko'"
}
 
Last edited:

Members online


Top