dellemc.openmanage.ome_template_network_vlan (9.1.0) — module

Set tagged and untagged vlans to native network card supported by a template on OpenManage Enterprise

| "added in version" 2.0.0 of dellemc.openmanage"

Authors: Jagadeesh N V(@jagadeeshnv)

Install collection

Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0


Add to requirements.yml

  collections:
    - name: dellemc.openmanage
      version: 9.1.0

Description

This module allows to set tagged and untagged vlans to native network card supported by a template on OpenManage Enterprise.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Add tagged or untagged VLANs to a template using VLAN ID and name
  dellemc.openmanage.ome_template_network_vlan:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    template_id: 78
    nic_identifier: NIC Slot 4
    untagged_networks:
      - port: 1
        untagged_network_id: 127656
      - port: 2
        untagged_network_name: vlan2
    tagged_networks:
      - port: 1
        tagged_network_ids:
          - 12767
          - 12768
      - port: 4
        tagged_network_ids:
          - 12767
          - 12768
        tagged_network_names:
          - vlan3
      - port: 2
        tagged_network_names:
          - vlan4
          - vlan1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Clear the tagged and untagged VLANs from a template
  dellemc.openmanage.ome_template_network_vlan:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    template_id: 78
    nic_identifier: NIC Slot 4
    untagged_networks:
      # For removing the untagged VLANs for the port 1 and 2
      - port: 1
        untagged_network_id: 0
      - port: 2
        untagged_network_name: 0
    tagged_networks:
      # For removing the tagged VLANs for port 1, 4 and 2
      - port: 1
        tagged_network_ids: []
      - port: 4
        tagged_network_ids: []
        tagged_network_names: []
      - port: 2
        tagged_network_names: []

Inputs

    
port:
    default: 443
    description: OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port.
    type: int

ca_path:
    description:
    - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for
      the validation.
    type: path
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

timeout:
    default: 30
    description: The socket level timeout in seconds.
    type: int
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

hostname:
    description: OpenManage Enterprise or OpenManage Enterprise Modular IP address or
      hostname.
    required: true
    type: str

password:
    description:
    - OpenManage Enterprise or OpenManage Enterprise Modular password.
    - If the password is not provided, then the environment variable C(OME_PASSWORD) is
      used.
    - 'Example: export OME_PASSWORD=password'
    required: true
    type: str

username:
    description:
    - OpenManage Enterprise or OpenManage Enterprise Modular username.
    - If the username is not provided, then the environment variable C(OME_USERNAME) is
      used.
    - 'Example: export OME_USERNAME=username'
    required: true
    type: str

template_id:
    description:
    - Id of the template.
    - It is mutually exclusive with I(template_name).
    type: int

template_name:
    description:
    - Name of the template.
    - It is mutually exclusive with I(template_id).
    type: str

nic_identifier:
    description: Display name of NIC port in the template for VLAN configuration.
    required: true
    type: str

propagate_vlan:
    default: true
    description:
    - To deploy the modified VLAN settings immediately without rebooting the server.
    - This option will be applied only when there are changes to the VLAN configuration.
    type: bool
    version_added: 3.4.0
    version_added_collection: dellemc.openmanage

validate_certs:
    default: true
    description:
    - If C(false), the SSL certificates will not be validated.
    - Configure C(false) only on personally controlled sites where self-signed certificates
      are used.
    - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default.
    type: bool
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

tagged_networks:
    description: List of tagged VLANs and their corresponding NIC ports.
    elements: dict
    suboptions:
      port:
        description: NIC port number of the tagged VLAN
        required: true
        type: int
      tagged_network_ids:
        description:
        - List of IDs of the tagged VLANs
        - Enter [] to remove the tagged VLAN from a port.
        - List of I(tagged_network_ids) is combined with list of I(tagged_network_names)
          when adding tagged VLANs to a port.
        - To get the VLAN network ID use the API U( https://I(hostname)/api/NetworkConfigurationService/Networks)
        elements: int
        type: list
      tagged_network_names:
        description:
        - List of names of tagged VLANs
        - Enter [] to remove the tagged VLAN from a port.
        - List of I(tagged_network_names) is combined with list of I(tagged_network_ids)
          when adding tagged VLANs to a port.
        elements: str
        type: list
    type: list

untagged_networks:
    description: List of untagged networks and their corresponding NIC ports.
    elements: dict
    suboptions:
      port:
        description: NIC port number of the untagged VLAN.
        required: true
        type: int
      untagged_network_id:
        description:
        - ID of the untagged VLAN
        - Enter 0 to clear the untagged VLAN from the port.
        - This option is mutually exclusive with I(untagged_network_name)
        - To get the VLAN network ID use the API U( https://I(hostname)/api/NetworkConfigurationService/Networks)
        type: int
      untagged_network_name:
        description:
        - name of the vlan for untagging
        - provide 0 for clearing the untagging for this I(port)
        - This parameter is mutually exclusive with I(untagged_network_id)
        type: str
    type: list

Outputs

error_info:
  description: Details of the HTTP Error.
  returned: on HTTP error
  sample:
    error:
      '@Message.ExtendedInfo':
      - Message: Unable to complete the request because TemplateId  does not exist
          or is not applicable for the resource URI.
        MessageArgs:
        - TemplateId
        MessageId: CGEN1004
        RelatedProperties: []
        Resolution: Check the request resource URI. Refer to the OpenManage Enterprise-Modular
          User's Guide for more information about resource URI and its properties.
        Severity: Critical
      code: Base.1.0.GeneralError
      message: A general error has occurred. See ExtendedInfo for more information.
  type: dict
msg:
  description: Overall status of the template vlan operation.
  returned: always
  sample: Successfully applied the network settings to template.
  type: str