For network Ios_command modules - Paramiko need to be installed for ansible connection
#BUG|ASK|Feature request|choose one and replace other
Replace all comments to answers. Before adding a new issue check the tracker for similar issues.
What's the core of the bug?
what's the core of the bug, question or feature request in......
NEW Ansible versions from 2.8 need paramiko installed seperately ( Paramiko is required for Ansible_connection : network_cli`
Exception output
...if exists in any logs. Try to reproduce it with log level DEBUG
.
"msg": "paramiko is not installed: No module named 'paramiko'" } <10.0.3.35> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-2968p1acdjax/ansible-tmp-1591769161.5673187-2973-16786343166504/ > /dev/null 2>&1 && sleep 0' The full traceback is: File "/tmp/ansible_ios_config_payload_607j32tj/ansible_ios_config_payload.zip/ansible/module_utils/network/ios/ios.py", line 86, in get_capabilities capabilities = Connection(module._socket_path).get_capabilities() File "/tmp/ansible_ios_config_payload_607j32tj/ansible_ios_config_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__ raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code) failed: [isg3] (item={'key': 1110, 'value': {'ip': 'XX.XX.X.X', 'netmask': '255.255.224.0', 'rules': 'BYPASS'}}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": {
How to reproduce?
How bug we could reproduce? (if it BUG of course)
RUN any ios module like below
` tasks:
- name: Backup CSR Devices ios_command: commands: show run register: config `
Current Polemarch version
polemarchctl webserver --version
Database type
Default, Mysql, etc...
RPC type
Default, RabbitMQ, Redis, etc...
Additional info
Other info that could help.
This could be your settings.ini or output of pip freeze
.
`
I am using docker install
docker run -d --name polemarch --restart always -p 8080:8080 -v /opt/polemarch/projects:/projects -v /opt/polemarch/hooks:/hooks vstconsulting/polemarch
Issue is only with ansible_connection: network_cli` when tried to establish connecttion to network OS Paramiko is missing - I had to install it manually for now. Followed below steps. It would be appreciated if its added to ur dockerfile
Paramiko ( pip install) - failed with few apk dependencies - so installed them too
apk add --update --no-cache g++ gcc libxml2-dev libxslt-dev python-dev libffi-dev openssl-dev make python3-dev
/opt/polemarch/bin/pip install -U ansible --upgrade-strategy=eager`