cisco.mso.ndo_l3out_secondary_ip module – Manage L3Out Secondary IP Address on Cisco Nexus Dashboard Orchestrator (NDO).

Note

This module is part of the cisco.mso collection (version 2.12.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.mso. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cisco.mso.ndo_l3out_secondary_ip.

New in cisco.mso 2.12.0

Synopsis

  • Manage L3Out L3Out Secondary IP Address on Cisco Nexus Dashboard Orchestrator (NDO).

  • This module is only supported on ND v3.1 (NDO v4.3) and later.

Requirements

The below requirements are needed on the host that executes this module.

  • Multi Site Orchestrator v2.1 or newer

Parameters

Parameter

Comments

dhcp_relay

boolean

Whether to enable Dynamic Host Configuration Protocol (DHCP) relay.

If this parameter is unspecified, NDO defaults to dhcp_relay=false.

Choices:

  • false

  • true

domain

aliases: domain_name

string

The name of the domain.

domain_provider

string

The provider of the domain.

Choices:

  • "cloudfoundry"

  • "kubernetes"

  • "microsoft"

  • "openshift"

  • "openstack"

  • "redhat"

  • "vmware"

  • "nutanix"

domain_type

string

The type of the domain.

Choices:

  • "vmm"

  • "physical"

encapsulation_type

aliases: encap_type

string

The encapsulation type of the interface.

Choices:

  • "vlan"

  • "vxlan"

encapsulation_value

aliases: encap, encapsulation, encapsulation_id

integer

The encapsulation value of the interface.

The option encapsulation_type=vlan, specifies VLAN ID which must be in the range 1 - 4094.

The option encapsulation_type=vxlan, specifies VXLAN Network Identifier (VNI) which must be in the range 5000 - 16777215.

host

aliases: hostname

string

IP Address or hostname of the ACI Multi Site Orchestrator host.

If the value is not specified in the task, the value of environment variable MSO_HOST will be used instead.

ipv6_dad

string

Whether to enable IPv6 Duplicate Address Detection (DAD).

If this parameter is unspecified, NDO defaults to ipv6_dad=disabled when parent_type=floating_svi_path_attributes.

If this parameter is unspecified, NDO defaults to ipv6_dad=enabled for all other parent types.

Choices:

  • "enabled"

  • "disabled"

l3out

string

The name of the L3Out.

This parameter or l3out_uuid is required.

l3out_uuid

string

The UUID of the L3Out.

This parameter or l3out is required.

login_domain

string

The login domain name to use for authentication.

The default value is Local.

If the value is not specified in the task, the value of environment variable MSO_LOGIN_DOMAIN will be used instead.

When using a HTTPAPI connection plugin the inventory variable ansible_httpapi_login_domain will be used if this attribute is not specified.

nd_ra_prefix

boolean

Whether to enable Neighbor Discovery (ND) Router Advertisement (RA).

If this parameter is unspecified, NDO defaults to nd_ra_prefix=false.

Choices:

  • false

  • true

node_id

aliases: node, border_leaf, anchor_node

string

The ID of the node (border leaf switch).

output_level

string

Influence the output of this MSO module.

normal means the standard output, incl. current dict

info adds informational output, incl. previous, proposed and sent dicts

debug adds debugging output, incl. filter_string, method, response, status and url information

If the value is not specified in the task, the value of environment variable MSO_OUTPUT_LEVEL will be used instead.

Choices:

  • "debug"

  • "info"

  • "normal" ← (default)

parent_type

string / required

The parent type of the L3Out.

Choices:

  • "floating_svi"

  • "routed"

  • "routed_sub"

  • "svi"

  • "floating_svi_path_attributes"

password

string

The password to use for authentication.

If the value is not specified in the task, the value of environment variables MSO_PASSWORD or ANSIBLE_NET_PASSWORD will be used instead.

path

aliases: interface

string

The path of the interface.

The path must be an existing physical port (eg. eth1/1).

port

integer

Port number to be used for the REST connection.

The default value depends on parameter `use_ssl`.

If the value is not specified in the task, the value of environment variable MSO_PORT will be used instead.

port_channel

aliases: pc

dictionary

The port channel details.

reference

aliases: ref

dictionary

The reference details of the port channel.

This parameter or port_channel.uuid is required.

name

string / required

The name of the port channel.

template

string

The name of the template that contains the port channel.

This parameter or port_channel.reference.template_id is required.

template_id

string

The ID of the template that contains the port channel.

This parameter or port_channel.reference.template is required.

uuid

string

The UUID of the port channel.

This parameter or port_channel.reference is required.

secondary_address

aliases: ipv4, ipv6, ip

string

The secondary IP address.

state

string

Use absent for removing.

Use query for listing an object or multiple objects.

Use present for creating or updating.

Choices:

  • "absent"

  • "query" ← (default)

  • "present"

template

aliases: l3out_template

string

The name of the L3Out template.

This parameter or template_id is required.

template_id

aliases: l3out_template_id

string

The ID of the L3Out template.

This parameter or template is required.

timeout

integer

The socket level timeout in seconds.

The default value is 30 seconds.

If the value is not specified in the task, the value of environment variable MSO_TIMEOUT will be used instead.

use_proxy

boolean

If false, it will not use a proxy, even if one is defined in an environment variable on the target hosts.

If the value is not specified in the task, the value of environment variable MSO_USE_PROXY will be used instead.

The default is true.

Choices:

  • false

  • true

use_ssl

boolean

If false, an HTTP connection will be used instead of the default HTTPS connection.

If the value is not specified in the task, the value of environment variable MSO_USE_SSL will be used instead.

When using a HTTPAPI connection plugin the inventory variable ansible_httpapi_use_ssl will be used if this attribute is not specified.

The default is false when using a HTTPAPI connection plugin (mso or nd) and true when using the legacy connection method (only for mso).

Choices:

  • false

  • true

username

string

The username to use for authentication.

If the value is not specified in the task, the value of environment variables MSO_USERNAME or ANSIBLE_NET_USERNAME will be used instead.

validate_certs

boolean

If false, SSL certificates will not be validated.

This should only set to false when used on personally controlled sites using self-signed certificates.

If the value is not specified in the task, the value of environment variable MSO_VALIDATE_CERTS will be used instead.

The default is true.

Choices:

  • false

  • true

virtual_port_channel

aliases: vpc

dictionary

The virtual port channel details.

reference

aliases: ref

dictionary

The reference details of the virtual port channel.

This parameter or virtual_port_channel.uuid is required.

name

string / required

The name of the virtual port channel.

template

string

The name of the template that contains the virtual port channel.

This parameter or virtual_port_channel.reference.template_id is required.

template_id

string

The ID of the template that contains the virtual port channel.

This parameter or virtual_port_channel.reference.template is required.

side_b

boolean

Whether the side of the virtual port channel interface is side B.

Choices:

  • false ← (default)

  • true

uuid

string

The UUID of the virtual port channel.

This parameter or virtual_port_channel.reference is required.

Notes

Note

See Also

See also

cisco.mso.ndo_template

Manage Templates on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_l3out_template

Manage L3Outs on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_l3out_routed_interface

Manage L3Out Routed Interfaces on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_l3out_routed_sub_interface

Manage L3Out Routed Sub-Interfaces on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_l3out_svi_interface

Manage L3Out SVI Interfaces on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_l3out_floating_svi_interface

Manage L3Out Floating SVI Interfaces on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_l3out_floating_svi_interface_path_attributes

Manage L3Out Floating SVI Interface Path Attributes on Cisco Nexus Dashboard Orchestrator (NDO).

Examples

- name: Create a secondary address on a L3out Routed Interface of type port
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    path: eth1/3
    parent_type: routed
    secondary_address: 3::102/16
    state: present

- name: Create a secondary address on a L3out Routed Interface of type port channel
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    port_channel:
      uuid: '{{ port_channel_interface_3.current.uuid }}'
    parent_type: routed
    secondary_address: 10.2.0.2/24
    state: present

- name: Create a secondary address on a L3out SVI Interface of type port
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    path: eth1/1
    encapsulation_type: vlan
    encapsulation_value: 103
    parent_type: svi
    secondary_address: 10.0.0.2/24
    state: present

- name: Create a secondary address on a L3out SVI Interface of type port channel
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    port_channel:
      uuid: '{{ port_channel_interface_1.current.uuid }}'
    encapsulation_type: vxlan
    encapsulation_value: 50001
    parent_type: svi
    secondary_address: 1::102/16
    state: present

- name: Create a secondary address on a L3out SVI Interface of type virtual port channel side a
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    virtual_port_channel:
      uuid: '{{ virtual_port_channel_interface_1.current.uuid }}'
    encapsulation_type: vlan
    encapsulation_value: 1000
    parent_type: svi
    secondary_address: 10.0.2.3/24
    state: present

- name: Create a secondary address on a L3out SVI Interface of type virtual port channel side b
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    virtual_port_channel:
      uuid: '{{ virtual_port_channel_interface_1.current.uuid }}'
      side_b: true
    encapsulation_type: vlan
    encapsulation_value: 1000
    parent_type: svi
    secondary_address: 10.0.2.4/24
    state: present

- name: Create a secondary address on a L3out Routed Sub-Interface of type port
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    path: eth1/2
    encapsulation_type: vlan
    encapsulation_value: 101
    parent_type: routed_sub
    secondary_address: 10.1.0.2/24
    state: present

- name: Create a secondary address on a L3out Routed Sub-Interface of type port channel
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    port_channel:
      uuid: '{{ port_channel_interface_2.current.uuid }}'
    encapsulation_type: vlan
    encapsulation_value: 101
    parent_type: routed_sub
    secondary_address: 2::102/16
    state: present

- name: Create a secondary address on a L3Out Floating SVI Interface
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    encapsulation_type: vlan
    encapsulation_value: 100
    parent_type: floating_svi
    secondary_address: 10.4.0.3/24
    state: present

- name: Create a secondary address on a L3Out Floating SVI Interface path attributes
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    encapsulation_type: vlan
    encapsulation_value: 100
    domain_type: vmm
    domain_provider: vmware
    domain: ansible_test_vmm
    parent_type: floating_svi_path_attributes
    secondary_address: 10.4.0.4/24
    state: present

- name: Update a secondary address on a L3out Routed Interface of type port
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    path: eth1/3
    parent_type: routed
    secondary_address: 3::102/16
    dhcp_relay: true
    ipv6_dad: disabled
    nd_ra_prefix: true

- name: Get a secondary address on a L3out Routed Interface of type port
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    path: eth1/3
    parent_type: routed
    secondary_address: 3::102/16
    state: query
  register: query_secondary_address

- name: Get all secondary addresses on a L3out Routed Interface of type port
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    path: eth1/3
    parent_type: routed
    state: query
  register: query_all

- name: Delete a secondary address on a L3out Routed Interface of type port
  cisco.mso.ndo_l3out_secondary_ip:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: l3out_template
    l3out: l3out_1
    node_id: 101
    path: eth1/3
    parent_type: routed
    secondary_address: 3::102/16
    state: absent

Authors

  • Akini Ross (@akinross)