Unable to bring fex ports up.!

I am trying this task:

  • name: Turn the fex ports up
    loop: “{{ new_fex }}”
    nxos_interfaces:
    config:
  • name: “{{ item }}”
  • enabled: true
    state: replaced

Getting the following error:

failed: [target] (item=Eth148/1/2) => {“ansible_loop_var”: “item”, “changed”: false, “item”: “Eth148/1/2”, “msg”: “Unsupported parameters for (nxos_interfaces) module: provider Supported parameters include: config, state”}

Any known quick fix to this one?

Thanks in advance.

Hey Anirudh,

Related to: https://github.com/ansible-collections/cisco.nxos/issues/236

This might be because either (a) ansible_network_os: cisco.nxos.nxos or (b) ansible_connection: ansible.netcommon.network_cli is not set.

Also, it seems the task you shared isn’t leveraging the module correctly. The config key in the nxos_interfaces resource module accepts a list of dictionaries, hence, it is not required to loop through items (which is slower). Please have a look at the examples in the module documentation for more details.

Thanks!