PaloAltoNetworks / ansible-pan

Ansible modules for Palo Alto Networks NGFWs
Other
229 stars 161 forks source link

Bug: panos_interface claiming parameters are not supported #405

Closed SpeedAndPower closed 4 years ago

SpeedAndPower commented 5 years ago

Running the following playbook snippet(this is one interface, I'm configuring 4 but all have same errors) produces an error about unsupported parameters.

  roles:
    - role: PaloAltoNetworks.paloaltonetworks

  tasks:
  - name: ethernet1/1 
    panos_interface:
      ip_address: '10.10.5.12'
      username: 'admin'
      password: 'admin'
      if_name: "ethernet1/1"
      mode: "layer3"
      ip: ["172.8.54.12"]
      enable_dhcp: false
      zone_name: "external"
      vr_name: "AWS"
      state: "present"
      commit: false  

When this is invoked I receive the following error.

fatal: [172.25.130.5]: FAILED! => {"changed": false, "failed": true, "msg": "Unsupported parameters for (panos_interface) module: enable_dhcp,ip,mode,operation Supported parameters include: commit,create_default_route,if_name,ip_address,password,username,zone_name"}

Doing a little digging it seems a version of panos_interface ships with ansible, but I am specifying Role: PaloAltoNetworks.paloaltonetworks Which I assumed would take precedence.

Is there a suggested way to override the built in modules to only use the role targeted in the playbook?

shinmog commented 5 years ago

@SpeedAndPower

Using the role overrides what ships with Ansible core. Since it isn't, there's something wrong with your environment somewhere. I'd suggest trying to install the role again and see what happens.

shinmog commented 4 years ago

This seems to be resolved, aging this issue out.