You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example playbook:
- hosts: ios_testingconnection: network_cligather_facts: notasks:
- name: Run a simple commandcisco.ios.ios_command:
commands:
- "show version"
EXPECTED RESULTS
show version should run on the switch
ACTUAL RESULTS
root@a682698ddfbf:/ansible# ansible-playbook -i inventory.txt minimal-test-playbook.yaml -vvvv
ansible-playbook [core 2.17.4]
config file = /ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-playbook
python version = 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.1.4
libyaml = True
Using /ansible/ansible.cfg as config file
setting up inventory plugins
Loading collection ansible.builtin from
host_list declined parsing /ansible/inventory.txt as it did not pass its verify_file() method
auto declined parsing /ansible/inventory.txt as it did not pass its verify_file() method
yaml declined parsing /ansible/inventory.txt as it did not pass its verify_file() method
Parsed /ansible/inventory.txt inventory source with ini plugin
Loading collection cisco.ios from /root/.ansible/collections/ansible_collections/cisco/ios
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.10/dist-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: minimal-test-playbook.yaml ***********************************************************************************
Positional arguments: minimal-test-playbook.yaml
verbosity: 4
remote_user: dnasvc
connection: ssh
become_method: sudo
tags: ('all',)
inventory: ('/ansible/inventory.txt',)
forks: 5
1 plays in minimal-test-playbook.yaml
PLAY [ios_testing] *****************************************************************************************************
TASK [Run a simple command] ********************************************************************************************
task path: /ansible/minimal-test-playbook.yaml:5
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /root/.ansible/collections/ansible_collections/ansible/netcommon
Loading collection ansible.utils from /root/.ansible/collections/ansible_collections/ansible/utils
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<10.12.254.21> Using network group action cisco.ios.ios for cisco.ios.ios_command
<10.12.254.21> attempting to start connection
<10.12.254.21> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/local/bin/ansible-connection
<10.12.254.21> local domain socket does not exist, starting it
<10.12.254.21> control socket path is /root/.ansible/pc/06121e456e
<10.12.254.21> Loading collection ansible.builtin from
<10.12.254.21> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<10.12.254.21> Loading collection ansible.netcommon from /root/.ansible/collections/ansible_collections/ansible/netcommon
<10.12.254.21> Loading collection ansible.utils from /root/.ansible/collections/ansible_collections/ansible/utils
<10.12.254.21> Loading collection cisco.ios from /root/.ansible/collections/ansible_collections/cisco/ios
<10.12.254.21> local domain socket listeners started successfully
<10.12.254.21> loaded cliconf plugin ansible_collections.cisco.ios.plugins.cliconf.ios from path /root/.ansible/collections/ansible_collections/cisco/ios/plugins/cliconf/ios.py for network_os cisco.ios.ios
<10.12.254.21> ssh type is set to auto
<10.12.254.21> autodetecting ssh_type
<10.12.254.21> ssh type is now set to libssh
<10.12.254.21> Loading collection ansible.builtin from
<10.12.254.21> local domain socket path is /root/.ansible/pc/06121e456e
<10.12.254.21> ANSIBLE_NETWORK_IMPORT_MODULES: enabled
<10.12.254.21> ANSIBLE_NETWORK_IMPORT_MODULES: found cisco.ios.ios_command at /root/.ansible/collections/ansible_collections/cisco/ios/plugins/modules/ios_command.py
<10.12.254.21> ANSIBLE_NETWORK_IMPORT_MODULES: running cisco.ios.ios_command
<10.12.254.21> ANSIBLE_NETWORK_IMPORT_MODULES: complete
The full traceback is:
File "/root/.ansible/collections/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py", line 60, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File "/usr/local/lib/python3.10/dist-packages/ansible/module_utils/connection.py", line 199, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [ios_device1]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show version"
],
"interval": 1,
"match": "all",
"retries": 9,
"wait_for": null
}
},
"msg": "unable to set terminal parameters"
}
PLAY RECAP *************************************************************************************************************
ios_device1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
root@a682698ddfbf:/ansible#
The text was updated successfully, but these errors were encountered:
SUMMARY
I am getting the error message "unable to set terminal parameters" on every playbook I run recently.
ISSUE TYPE
COMPONENT NAME
I am using the cisco-ios module
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
root@a682698ddfbf:/ansible# ansible-config dump --only-changed
CONFIG_FILE() = /ansible/ansible.cfg
DEFAULT_HOST_LIST(/ansible/ansible.cfg) = ['/ansible/inventory.txt']
DEFAULT_REMOTE_USER(/ansible/ansible.cfg) = dnasvc
HOST_KEY_CHECKING(env: ANSIBLE_HOST_KEY_CHECKING) = False
RETRY_FILES_ENABLED(/ansible/ansible.cfg) = False
root@a682698ddfbf:/ansible#
OS / ENVIRONMENT
STEPS TO REPRODUCE
root@a682698ddfbf:/ansible# ansible-playbook -i inventory.txt minimal-test-playbook.yaml
PLAY [ios_testing] *****************************************************************************************************
TASK [Run a simple command] ********************************************************************************************
fatal: [ios_device1]: FAILED! => {"changed": false, "msg": "unable to set terminal parameters"}
PLAY RECAP *************************************************************************************************************
ios_device1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
root@a682698ddfbf:/ansible#
EXPECTED RESULTS
show version should run on the switch
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: