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

1.1k views Asked by At

I am trying to send a 'show version' command to my Cisco ASA using Ansible, but I am encountering the following errors and I don't know why. The same thing works for my Cisco router though. Below are some details that might be helpful.

Cisco Asa version -> 9.12(2)9

Ansible version -> 2.9.13 

Python version -> 2.7.17

Ansible hosts:

#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 playbook:

- 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

Error encoutering:

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

Full error with -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"
}

Can someone please help me?

2

There are 2 answers

0
Mervin Hemaraju On BEST ANSWER

Using the below variables in my host file and installing paramiko with pip command fixed the issue for me:

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
0
PaulKoppara On

The following error indicates that during the execution of ios_command module an unsupported parameter 'command' was found. Do check the Ansible document [1] for the support parameters in the ios_command module.

--------------------------------------
"msg": "Unsupported parameters for (ios_command) module: command Supported parameters include: auth_pass, authorize, commands, host, interval, match, password, port, provider, retries, ssh_keyfile, timeout, username, wait_for"
--------------------------------------

After looking at your playbook 'command' is not supported in ios_command module 'commands' is the correct parameter. . Its better to refer the standard ansible documentations.