Unsupported Parameter ? module: security (vmware_vswitch)

Hi All,

Using examples from the documentation I can create a vswitch on our esxi host (v7)
But when I try to add settings like Teaming or security the playbook fails stating the parameter is unsuported.

ansible [core 2.12.10]
python version = 3.8.10 (default, Nov 22 2023, 10:22:35) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True
Running on Ubuntu 20.04.06

Relevant code from playbook:

  - name: Add vSwitch
    community.vmware.vmware_vswitch:
     validate_certs: false
     esxi_hostname: "{{ esxi_hostname }}"
     hostname: "{{ vcenter_ip }}"
     username: "{{ vcenter_user }}"
     password: "{{ vcenter_pass }}"
     switch: vmware_vsitch_0004
     nic_name: vmnic3
     mtu: 9000
     security:
       promiscuous_mode: true
    delegate_to: localhost

Any suggestions?

Hi, could you please provide actual error messages and the version of the collection community.vmware that installed on your environment?

1 Like

this is the error:

TASK [Add vSwitch] ****************************************************************************************************************************************
fatal: [xxxxxxx → localhost]: FAILED! => {“changed”: false, “msg”: “Unsupported parameters for (community.vmware.vmware_vswitch) module: security. Supported parameters include: hostname, esxi_hostname (host), mtu, password (pass, pwd), switch (switch_name), username (admin, user), state, number_of_ports, proxy_port, nics (nic_name), validate_certs, proxy_host, port.”}

Version of community is 4.1.0

Thanks,

Supported parameters include: hostname, esxi_hostname (host), mtu, password (pass, pwd), switch (switch_name), username (admin, user), state, number_of_ports, proxy_port, nics (nic_name), validate_certs, proxy_host, port.”}

This params seems to be the params for 2.3.0 or earlier.

Version of community is 4.1.0

Are you seeing both the old community.vmware and the new community.vmware in the command results of ansible-galaxy collection list | grep community.vmware?

1 Like

There seems to be a problem with my installation i guess.

ansible-galaxy collection: error: argument COLLECTION_ACTION: invalid choice: ‘list’ (choose from ‘init’, ‘build’, ‘publish’, ‘install’)

Thanks, so if you truly have core 2.12.10 installed, you should also be able to use ansible-galaxy collection list, so it sounds like you have something old left on your system.

Before correcting collection problems, check the version of Ansible you are running and try to fix the installation.

$ ansible --version
$ ansible-galaxy --version
$ ansible-config dump --only-changed -t all  # remove "-t all" if you got error
1 Like

Well, did an upgrade to ansible version 2.9.6 (maybe should not have done that)
Ansible-galaxy is also v2.9.6

these are the changes:
ansible-config dump --only-changed

DEFAULT_BECOME_ASK_PASS(/etc/ansible/ansible.cfg) =

DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) =

DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) =

Am thinking about starting all over with Ansible as we are not yet in production. Current Ubuntu is 20.04 so we could upgrade that as well …

Ubuntu 20.04 is still maintained since it is LTS, but Ansible 2.9.6 is quite old, it is already in EOL.
If it is possible, I recommend you to the latest stable releases; Python 3.12 and Ansible 9.x (includes ansible-core 2.16).

Refer to: Releases and maintenance — Ansible Documentation

1 Like

Yes will do.

Thanks for the assistance