It’s pretty basic playbook so not sure why its not working.
- name: Config Sys
hosts: router2
vars:
ansible_network_os: ios
ansible_connection: network_cli
ansible_user: Mxxxxx
ansible_password: password
ansible_become: yes
ansible_become_password: enablepass
ansible_become_method: enable
tasks:
- name: Do not gather hardware facts
ios_facts:
gather_subset: - “!hardware”
This is the error output:
The full traceback is:
WARNING: The below traceback may not be related to the actual failure.
File “/tmp/ansible_ios_facts_payload_Hc8MOY/ansible_ios_facts_payload.zip/ansible/module_utils/network/common/network.py”, line 229, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File “/tmp/ansible_ios_facts_payload_Hc8MOY/ansible_ios_facts_payload.zip/ansible/module_utils/connection.py”, line 185, in rpc
raise ConnectionError(to_text(msg, errors=‘surrogate_then_replace’), code=code)
fatal: [stage-2]: FAILED! => {
“ansible_facts”: {
“discovered_interpreter_python”: “/usr/bin/python”
},
“changed”: false,
“invocation”: {
“module_args”: {
“auth_pass”: null,
“authorize”: null,
“gather_network_resources”: null,
“gather_subset”: [
“!hardware”
],
“host”: null,
“password”: null,
“port”: null,
“provider”: null,
“ssh_keyfile”: null,
“timeout”: null,
“username”: null
}
},
“msg”: “Internal error”
}