我正在尝试使用 Ansible 向我的 Cisco ASA 发送“显示版本”命令,但遇到以下错误,我不知道为什么。不过,同样的事情适用于我的 Cisco 路由器。以下是一些可能有用的细节。
Cisco Asa version -> 9.12(2)9
Ansible version -> 2.9.13
Python version -> 2.7.17
Ansible 主机:
#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
阿萨剧本:
- 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"
},
"changed": false,
"invocation": {
"module_args": {
"authorize": null,
"commands": [
"show version"
],
"context": null,
"interval": 1,
"match": "all",
"passwords": null,
"provider": {
"auth_pass": null,
"authorize": false,
"context": null,
"host": null,
"password": null,
"passwords": null,
"port": null,
"ssh_keyfile": null,
"timeout": null,
"username": null
},
"retries": 10,
"wait_for": null
}
},
"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"
}
有人可以帮帮我吗?