问题描述
我正在尝试使用Ansible将“显示版本”命令发送到我的Cisco ASA,但是遇到以下错误,我不知道为什么。同样的事情适用于我的Cisco路由器。以下是一些可能有用的详细信息。
Cisco Asa version -> 9.12(2)9
Ansible version -> 2.9.13
Python version -> 2.7.17
可容纳的主机:
#This is a group of Remote Servers with GUI
[gui]
ubuntu ansible_user=admin
#These are global variables for the group Cisco
[cisco:vars]
ansible_connection=local
ansible_network_os=ios
#This is a group of Remote Servers for Cisco devices
[cisco]
cisco_router ansible_user=admin
[firewall:vars]
ansible_connection=local
[firewall]
cisco_asa ansible_user=admin
Asa剧本:
- name: "Connecting to Cisco ASA"
hosts: firewall
gather_facts: no
tasks:
- name: run show version on remote devices
cisco.asa.asa_command:
commands:
- show version
错误刺激:
fatal: [cisco_asa]: Failed! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"},"changed": false,"msg": "Unsupported parameters for (cisco.asa.asa_command) module: context,passwords found in provider. Supported parameters include: auth_pass,authorize,host,password,port,ssh_keyfile,timeout,username"}
-vvv的完整错误:
fatal: [cisco_asa]: Failed! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},"invocation": {
"module_args": {
"authorize": null,"commands": [
"show version"
],"context": null,"interval": 1,"match": "all","passwords": null,"provider": {
"auth_pass": null,"authorize": false,"host": null,"password": null,"port": null,"ssh_keyfile": null,"timeout": null,"username": null
},"retries": 10,"wait_for": null
}
},username"
}
有人可以帮我吗?
解决方法
在主机文件中使用以下变量并使用pip命令安装paramiko为我解决了该问题:
giftforhilt.com