(cisco.asa.asa_command) 模块不支持的参数:上下文,在提供程序中找到的密码

Unsupported parameters for (cisco.asa.asa_command) module: context, passwords found in provider

我正在尝试使用 Ansible 向我的 Cisco ASA 发送 'show version' 命令,但我遇到了以下错误,我不知道为什么。不过,同样的事情适用于我的 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

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"
},
"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"
}

有人可以帮我吗?

在我的主机文件中使用以下变量并使用 pip 命令安装 paramiko 解决了我的问题:

ansible_user=admin
ansible_ssh_pass=*****
ansible_become_method=enable
ansible_become_pass=*****
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=cisco.asa.asa
ansible_python_interpreter=python