cisco.ucs.ucs_vlan_find module – Find VLANs on Cisco UCS Manager
Note
This module is part of the cisco.ucs collection (version 1.8.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cisco.ucs
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.ucs.ucs_vlan_find
.
New in cisco.ucs 2.9
Synopsis
Find VLANs on Cisco UCS Manager based on different criteria.
Requirements
The below requirements are needed on the host that executes this module.
ucsmsdk
Parameters
Parameter |
Comments |
---|---|
The fabric configuration of the VLAN. This can be one of the following: common - The VLAN applies to both fabrics and uses the same configuration parameters in both cases. A — The VLAN only applies to fabric A. B — The VLAN only applies to fabric B. Choices:
|
|
IP address or hostname of Cisco UCS Manager. Modules can be used with the UCS Platform Emulator https://cs.co/ucspe |
|
Password for Cisco UCS Manager authentication. |
|
Regex pattern to find within the name property of the fabricVlan class. This is required if |
|
Port number to be used during connection (by default uses 443 for https and 80 for http connection). |
|
If use_proxy is no, specfies proxy to be used for connection. e.g. ‘http://proxy.xy.z:8080’ |
|
If Choices:
|
|
If Choices:
|
|
Username for Cisco UCS Manager authentication. Default: |
|
The unique string identifier assigned to the VLAN. A VLAN ID can be between ‘1’ and ‘3967’, or between ‘4048’ and ‘4093’. This is required if |
Examples
- name: Get all vlans in fabric A
cisco.ucs.ucs_vlan_find:
hostname: 172.16.143.150
username: admin
password: password
fabric: 'A'
pattern: '.'
- name: Confirm if vlan 15 is present
cisco.ucs.ucs_vlan_find:
hostname: 172.16.143.150
username: admin
password: password
vlanid: '15'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
basic details of vlans found Returned: on success Sample: |