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 |
|---|---|
admin_state string | The administrative state of the SPAN Session. Defaults to Choices:
|
description string | The description of the SPAN Session. |
destination_epg dictionary | The destination EPG configuration group. This parameter or |
|
destination_ip string |
The destination IP address to route SPAN Session packets. |
|
dscp string |
The DSCP value for sending the monitored SPAN Session packets. Defaults to Choices:
|
|
enforce_span_version boolean |
Enforce the SPAN Session version defined in Defaults to true when unset during creation. Choices:
|
|
epg dictionary |
The destination EPG to use for the SPAN Session. This parameter or |
|
anp string |
The name of the ANP that contains the destination EPG. This parameter or |
|
anp_uuid string |
The UUID of the ANP that contains the destination EPG. This parameter or |
|
name string / required |
The name of the destination EPG. |
|
schema string |
The name of the schema that contains the destination EPG. This parameter or |
|
schema_id string |
The ID of the schema that contains the destination EPG. This parameter or |
|
template string |
The name of the template that contains the destination EPG. This parameter or |
|
template_id string |
The ID of the template that contains the destination EPG. This parameter or |
|
epg_uuid string |
The UUID of the destination EPG to use for the SPAN Session. This parameter or |
|
flow_id integer |
The flow ID of the SPAN Session packets. The value must be in the range 1 - 1023. Defaults to 1 when unset during creation. |
|
source_ip_prefix string |
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. |
|
span_version string |
The version of the SPAN Session. Defaults to Choices:
|
|
ttl integer |
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. |
destination_port dictionary | The destination port configuration group. This parameter or |
|
port dictionary |
The destination port to use for the SPAN Session. This parameter or |
|
interface string / required |
The Ethernet interface of the Node to use for the SPAN Session |
|
node integer / required |
The Node ID of the Node to use for the SPAN Session. |
|
port_uuid string |
The UUID of the destination port to use for the SPAN Session. This parameter or |
destination_port_channel dictionary | The destination port channel configuration group. This parameter or |
|
port_channel dictionary |
The destination port channel to use for the SPAN Session. This parameter or |
|
name string / required |
The name of the destination port channel. |
|
template string |
The name of the template that contains the destination port channel. This parameter or |
|
template_id string |
The ID of the template that contains the destination port channel. This parameter or |
|
port_channel_uuid string |
The UUID of the destination port channel to use for the SPAN Session. This parameter or |
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 |
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 When using a HTTPAPI connection plugin the inventory variable |
mtu integer | The MTU truncation size for the SPAN packets. The value must be in the range 64 - 9216. Defaults to 1518 when unset during creation. |
name aliases: span_session string | The name of the SPAN Session. |
output_level string | Influence the output of this MSO module.
If the value is not specified in the task, the value of environment variable Choices:
|
password string | The password to use for authentication. If the value is not specified in the task, the value of environment variables |
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 |
state string | Use Use Use Choices:
|
template string | The name of the template. The template must be a Fabric Monitoring Access Policy template. This parameter or |
template_id string | The ID of the template. The template must be a Fabric Monitoring Access Policy template. This parameter or |
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 |
use_proxy boolean | If If the value is not specified in the task, the value of environment variable The default is Choices:
|
use_ssl boolean | 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:
|
username string | The username to use for authentication. If the value is not specified in the task, the value of environment variables |
uuid aliases: span_session_uuid string | The UUID of the SPAN Session. This parameter is required when the |
validate_certs boolean | 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
templatemust exist before using this module in your playbook. Use cisco.mso.ndo_template to create the Fabric Monitoring Access Policy template. - The
destination_epg.epgmust 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_channelmust 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
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/mso/ndo_fabric_span_session_module.html