Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acls module returning "Unsupported parameters" error #180

Open
moseley1983 opened this issue Sep 24, 2022 · 6 comments
Open

acls module returning "Unsupported parameters" error #180

moseley1983 opened this issue Sep 24, 2022 · 6 comments
Assignees

Comments

@moseley1983
Copy link

moseley1983 commented Sep 24, 2022

SUMMARY

In AWX 17.1.0 when using the cisco.asa.asa_acls module I get error:
TASK [ASA_ROLE : ACLTEST 2] ****************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (cisco.asa.asa_acls) module: provider Supported parameters include: config, running_config, state"}

COMPONENT NAME

cisco.asa.asa_acls

ANSIBLE VERSION

2.9.18


##### COLLECTION VERSION
<!--- Paste verbatim output from "ansible-galaxy collection list <namespace>.<collection>"  between the quotes
for example: ansible-galaxy collection list community.general
-->
```paste below

ansible-galaxy collection install cisco.asa

OS / ENVIRONMENT

Ubuntu 20.4, using AWX

STEPS TO REPRODUCE
- name: "ACL TEST 1"
  hosts: localhost
  connection: local       <--- have also tried "connection: network_cli"
#  gather_facts: false
  collections: 
    - cisco.asa

  tasks:
    - name: "CREATE NODE"
      import_role: 
        name: ASA_ROLE
        tasks_from: acl1.yml

- name: "ACLTEST 2"
  cisco.asa.asa_acls:
    config:
      acls:
        - name: purple_access_in
          acl_type: extended
          aces:
          - grant: permit
            line: 1
            protocol_options:
              tcp: true
            source:
              address: 192.0.4.0
              netmask: 255.255.255.0
              port_protocol:
                eq: telnet
            destination:
              address: 192.0.5.0
              netmask: 255.255.255.0
              port_protocol:
                eq: https
    state: merged



EXPECTED RESULTS

Expected for the module to work like it does when I use ansible engine with the same parameters

ACTUAL RESULTS
{
  "msg": "Unsupported parameters for (cisco.asa.asa_acls) module: provider Supported parameters include: config, running_config, state",
  "invocation": {
    "module_args": {
      "config": {
        "acls": [
          {
            "name": "purple_access_in",
            "acl_type": "extended",
            "aces": [
              {
                "grant": "permit",
                "line": 1,
                "protocol_options": {
                  "tcp": true
                },
                "source": {
                  "address": "192.0.4.0",
                  "netmask": "255.255.255.0",
                  "port_protocol": {
                    "eq": "telnet"
                  }
                },
                "destination": {
                  "address": "192.0.5.0",
                  "netmask": "255.255.255.0",
                  "port_protocol": {
                    "eq": "https"
                  }
                }
              }
            ]
          }
        ]
      },
      "state": "merged",
      "provider": {
        "host": null,
        "port": null,
        "username": null,
        "password": null,
        "ssh_keyfile": null,
        "authorize": false,
        "auth_pass": null,
        "timeout": null
      }
    }
  },
  "_ansible_no_log": false,
  "changed": false
}
I've also tried adding "provider" to the ansible role variables but still not working
@moseley1983
Copy link
Author

Is there an update for this please team?

@justjais
Copy link
Member

justjais commented Nov 2, 2022

@moseley1983 please excuse us for the delayed response, the entire team was involved in Ansiblefest which got concluded recently. I'll triage the issue and update you ASAP.

@moseley1983
Copy link
Author

That's great @justjais thanks for looking into this.

@justjais justjais assigned justjais and unassigned NilashishC Nov 7, 2022
@justjais
Copy link
Member

justjais commented Nov 7, 2022

@moseley1983 I've verified the issue from my end and It seems that for you connection: local is being used to connect to the ASA instance as when I switch to ansible_connection: local from ansible_connection=network_cli I see the provider error popping up. It's expected as with connection: local, provider dict gets injected which isn’t part of newer RMs and hence the error.

Here are the inventory details with which I do not see the error:

[asa:vars]
ansible_ssh_host=asa_host
ansible_network_os=asa
ansible_user=admin
ansible_become=true
ansible_become_method=ansible.netcommon.enable
ansible_connection=ansible.netcommon.network_cli
ansible_become_pass=admin
ansible_python_interpreter=python

And, one with which I am able to reproduce the provider error:

[asa:vars]
ansible_ssh_host=asa_host
ansible_network_os=asa
ansible_user=admin
ansible_become=true
ansible_become_method=ansible.netcommon.enable
ansible_connection=local
ansible_become_pass=admin
ansible_python_interpreter=python

Also, you can verify the connection plugin if you run the play with verbose output by running the play with -vvvv. When local connection is used you can see the log as using connection plugin network_cli (was local) and with network_cli you'll just see log as using connection plugin network_cli w/o local.

@justjais
Copy link
Member

justjais commented Dec 1, 2022

@moseley1983 were you able to check back on this issue?

@moseley1983
Copy link
Author

Hi @justjais, thanks for getting back to me. I haven't got around to checking this yet. Please feel free to close the call. I won't be able to check this for a long time now. Thanks for all your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants