(py3.6.10) amhatre@ashwinis-MacBook-Pro playbooks % pip show ansible-pylibssh
Name: ansible-pylibssh
Version: 0.2.0
Summary: Python bindings for libssh client specific to Ansible use case
Home-page: https://github.com/ansible/pylibssh
Author: Ansible, Inc.
Author-email: info+github/ansible/[email protected]
License: LGPLv2+
Location: /Users/amhatre/ansible_venvs/py3.6.10/lib/python3.6/site-packages
Requires:
Required-by:
changed: [127.0.0.1] => {
"changed": true,
"commands": [
"load harddisk:/ansible_config.txt"
],
"diff": {
"prepared": "Building configuration...\n!! IOS XR Configuration 7.0.2\n+ interface preconfigure GigabitEthernet0/0/0/0\n !\n+ interface preconfigure GigabitEthernet0/0/0/1\n !\n+ interface preconfigure GigabitEthernet0/0/0/2\n !\nend"
},
"invocation": {
"module_args": {
"admin": false,
"after": null,
"backup": false,
"backup_options": null,
"before": null,
"comment": "configured by iosxr_config",
"config": null,
"exclusive": false,
"force": false,
"label": null,
"lines": null,
"match": "line",
"parents": null,
"provider": null,
"replace": "config",
"src": "hostname test1\nbanner motd \"hell\"\ntelnet vrf default ipv4 server max-servers 10\nusername vagrant\n group root-lr\n group cisco-support\n secret 10 $6$Zf8Qze0rDkx1z...$/1ly7j2qqH5vYIpGEG2a8khtTdEEGS3NnbRv6izmWCLteCQSFt2YbBCVQOfETj4A0IPquaPj8yWEqH1vXck06/\n!\nusername amhatre\n group root-lr\n group cisco-support\n!\ntpa\n vrf default\n address-family ipv4\n update-source dataports MgmtEth0/RP0/CPU0/0\n !\n !\n!\ncall-home\n service active\n contact smart-licensing\n profile CiscoTAC-1\n active\n destination transport-method http\n !\n!\nnetconf-yang agent\n ssh\n!\ninterface Loopback888\n!\ninterface Loopback999\n!\ninterface MgmtEth0/RP0/CPU0/0\n ipv4 address dhcp\n!\ninterface preconfigure GigabitEthernet0/0/0/0\n!\ninterface preconfigure GigabitEthernet0/0/0/1\n!\ninterface preconfigure GigabitEthernet0/0/0/2\n!\nprefix-set ebpg_filter\n 192.168.0.0/16 ge 15 le 30\nend-set\n!\nprefix-set ebpg_filter2\n 192.168.0.0/16 ge 17 le 30\nend-set\n! \nrouter static\n address-family ipv4 unicast\n 0.0.0.0/0 MgmtEth0/RP0/CPU0/0 10.0.2.2\n ! \n! \nrouter bgp 1\n! \nssh server v2\nssh server vrf default\nssh server netconf vrf default\nend\n"
}
}
}
META: ran handlers
META: ran handlers
PLAY RECAP ***********************************************************************************************************************************************************************
127.0.0.1 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/amhatre/.ansible/tmp/ansible-local-34893sr5i_bwc/ansible-tmp-1622724615.099243-34897-263822561108764/ /Users/amhatre/.ansible/tmp/ansible-local-34893sr5i_bwc/ansible-tmp-1622724615.099243-34897-263822561108764/AnsiballZ_iosxr_config.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/Users/amhatre/ansible_venvs/py3.6.10/bin/python /Users/amhatre/.ansible/tmp/ansible-local-34893sr5i_bwc/ansible-tmp-1622724615.099243-34897-263822561108764/AnsiballZ_iosxr_config.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /Users/amhatre/.ansible/tmp/ansible-local-34893sr5i_bwc/ansible-tmp-1622724615.099243-34897-263822561108764/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
File "/var/folders/j6/fqn4v5252b9_4ck6xxq4_rqm0000gn/T/ansible_cisco.iosxr.iosxr_config_payload_sjx_ttxa/ansible_cisco.iosxr.iosxr_config_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/iosxr.py", line 599, in copy_file
conn.copy_file(source=src, destination=dst, proto=proto)
File "/var/folders/j6/fqn4v5252b9_4ck6xxq4_rqm0000gn/T/ansible_cisco.iosxr.iosxr_config_payload_sjx_ttxa/ansible_cisco.iosxr.iosxr_config_payload.zip/ansible/module_utils/connection.py", line 195, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [127.0.0.1]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"admin": false,
"after": null,
"backup": false,
"backup_options": null,
"before": null,
"comment": "configured by iosxr_config",
"config": null,
"exclusive": false,
"force": false,
"label": null,
"lines": null,
"match": "line",
"parents": null,
"provider": null,
"replace": "config",
"src": "hostname test1\nbanner motd \"hell\"\ntelnet vrf default ipv4 server max-servers 10\nusername vagrant\n group root-lr\n group cisco-support\n secret 10 $6$Zf8Qze0rDkx1z...$/1ly7j2qqH5vYIpGEG2a8khtTdEEGS3NnbRv6izmWCLteCQSFt2YbBCVQOfETj4A0IPquaPj8yWEqH1vXck06/\n!\nusername amhatre\n group root-lr\n group cisco-support\n!\ntpa\n vrf default\n address-family ipv4\n update-source dataports MgmtEth0/RP0/CPU0/0\n !\n !\n!\ncall-home\n service active\n contact smart-licensing\n profile CiscoTAC-1\n active\n destination transport-method http\n !\n!\nnetconf-yang agent\n ssh\n!\ninterface Loopback888\n!\ninterface Loopback999\n!\ninterface MgmtEth0/RP0/CPU0/0\n ipv4 address dhcp\n!\ninterface preconfigure GigabitEthernet0/0/0/0\n!\ninterface preconfigure GigabitEthernet0/0/0/1\n!\ninterface preconfigure GigabitEthernet0/0/0/2\n!\nprefix-set ebpg_filter\n 192.168.0.0/16 ge 15 le 30\nend-set\n!\nprefix-set ebpg_filter2\n 192.168.0.0/16 ge 17 le 30\nend-set\n! \nrouter static\n address-family ipv4 unicast\n 0.0.0.0/0 MgmtEth0/RP0/CPU0/0 10.0.2.2\n ! \n! \nrouter bgp 1\n! \nssh server v2\nssh server vrf default\nssh server netconf vrf default\nend\n"
}
},
"msg": "Writing to remote file [b'/harddisk:/ansible_config.txt'] failed"
}
PLAY RECAP ***********************************************************************************************************************************************************************
127.0.0.1