Q: Uploading File to Nexus 9000 with Ansible Playbook Trying to automate file uploading process to the Cisco Nexus 9000 device with Ansible Playbook.
- name: Upload File to Nexus Device
  gather_facts: no
  hosts: localhost
  connection: local

  tasks:
    - name: Uploading file 
      nxos_file_copy:
        provider:
          username: admin
          ssh_keyfile: "files/id_rsa"
          host: 192.168.0.100
          validate_certs: no
          transport: cli
        local_file: "config.txt"
        remote_file: "config.txt"

When running the playbook I am getting following error
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_4UEm25/ansible_module_nxos_file_copy.py", line 255, in <module>
    main()
  File "/tmp/ansible_4UEm25/ansible_module_nxos_file_copy.py", line 245, in main
    transfer_file(module, dest)
  File "/tmp/ansible_4UEm25/ansible_module_nxos_file_copy.py", line 174, in transfer_file
    port=port)
  File "/home/user/venv/ansible-cox/local/lib/python2.7/site-packages/paramiko/client.py", line 424, in connect
    passphrase,
  File "/home/user/venv/ansible-cox/local/lib/python2.7/site-packages/paramiko/client.py", line 714, in _auth
    raise saved_exception
paramiko.ssh_exception.PasswordRequiredException: Private key file is encrypted

fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_4UEm25/ansible_module_nxos_file_copy.py\", line 255, in <module>\n    main()\n  File \"/tmp/ansible_4UEm25/ansible_module_nxos_file_copy.py\", line 245, in main\n    transfer_file(module, dest)\n  File \"/tmp/ansible_4UEm25/ansible_module_nxos_file_copy.py\", line 174, in transfer_file\n    port=port)\n  File \"/home/user/venv/ansible-cox/local/lib/python2.7/site-packages/paramiko/client.py\", line 424, in connect\n    passphrase,\n  File \"/home/user/venv/ansible-cox/local/lib/python2.7/site-packages/paramiko/client.py\", line 714, in _auth\n    raise saved_exception\nparamiko.ssh_exception.PasswordRequiredException: Private key file is encrypted\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 1
}

When SSH-ing from local terminal with the same key it works
(ansible) ~/B/c/Ansible on master ⨯ ssh admin@192.168.0.100 -i files/id_rsa
User Access Verification
NX9K#

I am using Ansible 2.5.4 version.
Any help is greatly appreciated!
