cisco.mso.ndo_fabric_span_session module – Manage Fabric SPAN Sessions on Cisco Nexus Dashboard Orchestrator (NDO).
Note
This module is part of the cisco.mso collection (version 2.11.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_fabric_span_session
.
New in cisco.mso 2.11.0
Synopsis
Manage Switched Port Analyzer (SPAN) Sessions on Cisco Nexus Dashboard Orchestrator (NDO).
This module is only supported on ND v3.1 (NDO v4.4) 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 |
---|---|
The administrative state of the SPAN Session. Defaults to Choices:
|
|
The description of the SPAN Session. |
|
The destination EPG configuration group. This parameter or |
|
The destination IP address to route SPAN Session packets. |
|
The DSCP value for sending the monitored SPAN Session packets. Defaults to Choices:
|
|
Enforce the SPAN Session version defined in Defaults to true when unset during creation. Choices:
|
|
The destination EPG to use for the SPAN Session. This parameter or |
|
The name of the ANP that contains the destination EPG. This parameter or |
|
The UUID of the ANP that contains the destination EPG. This parameter or |
|
The name of the destination EPG. |
|
The name of the schema that contains the destination EPG. This parameter or |
|
The ID of the schema that contains the destination EPG. This parameter or |
|
The name of the template that contains the destination EPG. This parameter or |
|
The ID of the template that contains the destination EPG. This parameter or |
|
The UUID of the destination EPG to use for the SPAN Session. This parameter or |
|
The flow ID of the SPAN Session packets. The value must be in the range 1 - 1023. Defaults to 1 when unset during creation. |
|
The prefix used to assign source IP addresses to ERSPAN packets which can be used to identify which Leaf or Spine is sending the traffic. This can be any IP. If the prefix is used, the node ID of the source node is used for the undefined bits of the prefix. |
|
The version of the SPAN Session. Defaults to Choices:
|
|
The time to live (TTL) of the SPAN Session packets. The value must be in the range 1 - 1023. Defaults to 1 when unset during creation. |
|
The destination port configuration group. This parameter or |
|
The destination port to use for the SPAN Session. This parameter or |
|
The Ethernet interface of the Node to use for the SPAN Session |
|
The Node ID of the Node to use for the SPAN Session. |
|
The UUID of the destination port to use for the SPAN Session. This parameter or |
|
The destination port channel configuration group. This parameter or |
|
The destination port channel to use for the SPAN Session. This parameter or |
|
The name of the destination port channel. |
|
The name of the template that contains the destination port channel. This parameter or |
|
The ID of the template that contains the destination port channel. This parameter or |
|
The UUID of the destination port channel to use for the SPAN Session. This parameter or |
|
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 |
|
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 When using a HTTPAPI connection plugin the inventory variable |
|
The MTU truncation size for the SPAN packets. The value must be in the range 64 - 9216. Defaults to 1518 when unset during creation. |
|
The name of the SPAN Session. |
|
Influence the output of this MSO module.
If the value is not specified in the task, the value of environment variable Choices:
|
|
The password to use for authentication. If the value is not specified in the task, the value of environment variables |
|
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 |
|
Use Use Use Choices:
|
|
The name of the template. The template must be a Fabric Monitoring Access Policy template. This parameter or |
|
The ID of the template. The template must be a Fabric Monitoring Access Policy template. This parameter or |
|
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 |
|
If If the value is not specified in the task, the value of environment variable The default is Choices:
|
|
If If the value is not specified in the task, the value of environment variable When using a HTTPAPI connection plugin the inventory variable The default is Choices:
|
|
The username to use for authentication. If the value is not specified in the task, the value of environment variables |
|
The UUID of the SPAN Session. This parameter is required when the |
|
If This should only set to If the value is not specified in the task, the value of environment variable The default is Choices:
|
Notes
Note
The
template
must exist before using this module in your playbook. Use cisco.mso.ndo_template to create the Fabric Monitoring Access Policy template.The
destination_epg.epg
must exist before using it with this module in your playbook. Use cisco.mso.mso_schema_template_anp_epg to create the EPG.The
destination_port_channel.port_channel
must exist before using it with this module in your playbook. Use cisco.mso.ndo_port_channel_interface to create the Fabric resource port channel interface.This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions.
See Also
See also
- cisco.mso.ndo_template
Manage Templates on Cisco Nexus Dashboard Orchestrator (NDO).
- cisco.mso.mso_schema_template_anp_epg
Manage Endpoint Groups (EPGs) in schema templates.
- cisco.mso.ndo_port_channel_interface
Manage Port Channel Interfaces on Cisco Nexus Dashboard Orchestrator (NDO).
Examples
- name: Create Fabric SPAN Session with destination EPG
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_epg
destination_epg:
epg:
schema: ansible_test
template: Template1
anp: Anp1
name: EPG1
destination_ip: "1.1.1.1"
source_ip_prefix: "2.2.2.2"
state: present
register: create_epg_span_session
- name: Create Fabric SPAN Session with destination Port
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_port
destination_port:
port:
node: 101
interface: "eth1/1"
state: present
- name: Create Fabric SPAN Session with destination Port Channel
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_pc
destination_port_channel:
port_channel:
template: ansible_test
name: ansible_test_resource_pc_1
state: present
- name: Update Fabric SPAN Session from destination EPG to destination Port
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_epg
destination_port:
port:
node: 101
interface: "eth1/1"
state: present
- name: Update Fabric SPAN Session from destination Port to destination Port Channel
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_port
destination_port_channel:
port_channel:
template: ansible_test
name: ansible_test_resource_pc_1
state: present
- name: Update Fabric SPAN Session from destination Port Channel to destination EPG
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_pc
destination_epg:
epg:
schema: ansible_test
template: Template1
anp: Anp1
name: EPG1
destination_ip: "1.1.1.1"
source_ip_prefix: "2.2.2.2"
state: present
- name: Update the Fabric SPAN Session name using UUID
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
uuid: "{{ create_epg_span_session.current.uuid }}"
name: ansible_test_pc_updated
state: present
- name: Query a specific Fabric SPAN Session using name
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_pc_updated
state: query
register: query_with_name
- name: Query a specific Fabric SPAN Session using UUID
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
uuid: "{{ create_epg_span_session.current.uuid }}"
state: query
register: query_with_uuid
- name: Query all Fabric SPAN Sessions
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
state: query
register: query_all_objects
- name: Delete a specific Fabric SPAN Session using Name
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: ansible_test
name: ansible_test_pc_updated
state: absent
- name: Delete a Fabric SPAN Session using UUID
cisco.mso.ndo_fabric_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template_id: ansible_test
uuid: "{{ create_epg_span_session.current.uuid }}"
state: absent