cisco.mso.ndo_fabric_span_session_source_filter module – Manage Fabric SPAN Sessions Source Filter on Cisco Nexus Dashboard Orchestrator (NDO).

Note

This module is part of the cisco.mso collection (version 2.13.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_source_filter.

New in cisco.mso 2.11.0

Synopsis

  • Manage Switched Port Analyzer (SPAN) Sessions Source Filter on Cisco Nexus Dashboard Orchestrator (NDO).

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

  • This module allows for creation and deletion only; updates are not supported.

Requirements

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

  • Multi Site Orchestrator v2.1 or newer

Parameters

Parameter

Comments

destination_ip_prefix

string

The destination IP prefix for the SPAN Session source filter.

This filters traffic based on the destination IP address.

This can be a valid IPv4 or IPv6 address.

destination_port_from

string

The starting destination port number for the SPAN Session source filter.

This parameter is required to query/delete a specific SPAN session source filter when not configured with “unspecified”.

Choices:

  • "53"

  • "dns"

  • "20"

  • "ftp_data"

  • "80"

  • "http"

  • "443"

  • "https"

  • "110"

  • "pop3"

  • "554"

  • "rtsp"

  • "25"

  • "smtp"

  • "22"

  • "ssh"

  • "0"

  • "unspecified" ← (default)

destination_port_to

string

The ending destination port number for the SPAN Session source filter.

This parameter is required to query/delete a specific SPAN session source filter when not configured with “unspecified”.

Choices:

  • "53"

  • "dns"

  • "20"

  • "ftp_data"

  • "80"

  • "http"

  • "443"

  • "https"

  • "110"

  • "pop3"

  • "554"

  • "rtsp"

  • "25"

  • "smtp"

  • "22"

  • "ssh"

  • "0"

  • "unspecified" ← (default)

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.

ip_protocol

string

The IP protocol for the SPAN Session source filter.

This filters traffic based on the Layer 3 or Layer 4 protocol.

This parameter is required to query/delete a specific SPAN session source filter when not configured with “unspecified”.

Choices:

  • "0"

  • "unspecified" ← (default)

  • "egp"

  • "8"

  • "eigrp"

  • "88"

  • "icmp"

  • "1"

  • "icmpv6"

  • "58"

  • "igmp"

  • "2"

  • "igp"

  • "9"

  • "l2tp"

  • "115"

  • "ospfigp"

  • "89"

  • "pim"

  • "103"

  • "tcp"

  • "6"

  • "udp"

  • "17"

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.

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)

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.

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.

source_ip_prefix

string

The source IP prefix for the SPAN Session source filter.

This filters traffic based on the source IP address.

This can be a valid IPv4 or IPv6 address.

source_port_from

string

The starting source port number for the SPAN Session source filter.

This parameter is required to query/delete a specific SPAN session source filter when not configured with “unspecified”.

Choices:

  • "53"

  • "dns"

  • "20"

  • "ftp_data"

  • "80"

  • "http"

  • "443"

  • "https"

  • "110"

  • "pop3"

  • "554"

  • "rtsp"

  • "25"

  • "smtp"

  • "22"

  • "ssh"

  • "0"

  • "unspecified" ← (default)

source_port_to

string

The ending source port number for the SPAN Session source filter.

This parameter is required to query/delete a specific SPAN session source filter when not configured with “unspecified”.

Choices:

  • "53"

  • "dns"

  • "20"

  • "ftp_data"

  • "80"

  • "http"

  • "443"

  • "https"

  • "110"

  • "pop3"

  • "554"

  • "rtsp"

  • "25"

  • "smtp"

  • "22"

  • "ssh"

  • "0"

  • "unspecified" ← (default)

span_session_name

string

The name of the SPAN Session.

This parameter or span_session_uuid is required.

span_session_source_name

string

The name of the SPAN Session source.

span_session_uuid

string

The UUID of the SPAN Session.

This parameter or span_session_name is required.

state

string

Use absent for removing.

Use query for listing an object or multiple objects.

Use present for creating.

Choices:

  • "absent"

  • "query" ← (default)

  • "present"

template

string

The name of the template.

The template must be a Fabric Monitoring Access Policy template.

This parameter or template_id is required.

template_id

string

The ID of the template.

The template must be a Fabric Monitoring Access Policy 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

Notes

Note

See Also

See also

cisco.mso.ndo_template

Manage Templates on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_fabric_span_session

Manage Fabric SPAN Sessions on Cisco Nexus Dashboard Orchestrator (NDO).

cisco.mso.ndo_fabric_span_session_source

Manage Fabric SPAN Sessions Source on Cisco Nexus Dashboard Orchestrator (NDO).

Examples

- name: Create SPAN Session source with IPv4 address
  cisco.mso.ndo_fabric_span_session_source_filter:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: ansible_test_mon_pol
    span_session_name: ansible_test_span_session
    span_session_source_name: ansible_test_source_1
    source_ip_prefix: 1.1.1.1
    destination_ip_prefix: 2.2.2.2
    source_port_from: http
    source_port_to: https
    destination_port_from: http
    destination_port_to: https
    ip_protocol: tcp
    state: present

- name: Create SPAN Session source filter with IPv6 address
  cisco.mso.ndo_fabric_span_session_source_filter:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: ansible_test_mon_pol
    span_session_name: ansible_test_span_session
    span_session_source_name: ansible_test_source_1
    source_ip_prefix: 1::1
    destination_ip_prefix: 2::2
    source_port_from: 20
    source_port_to: 22
    destination_port_from: 25
    destination_port_to: 110
    ip_protocol: 6
    state: present

- name: Query a specific SPAN Session source filter
  cisco.mso.ndo_fabric_span_session_source_filter:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: ansible_test_mon_pol
    span_session_name: ansible_test_span_session
    span_session_source_name: ansible_test_source_1
    source_ip_prefix: 1.1.1.1
    destination_ip_prefix: 2.2.2.2
    source_port_from: "ftp_data"
    source_port_to: "ssh"
    destination_port_from: "smtp"
    destination_port_to: "pop3"
    ip_protocol: "tcp"
    state: query
  register: query_one

- name: Query all SPAN Session source filters
  cisco.mso.ndo_fabric_span_session_source_filter:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: ansible_test_mon_pol
    span_session_name: ansible_test_span_session
    span_session_source_name: ansible_test_source_1
    state: query
  register: query_all

- name: Delete a specific SPAN Session source filter
  cisco.mso.ndo_fabric_span_session_source_filter:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    template: ansible_test_mon_pol
    span_session_name: ansible_test_span_session
    span_session_source_name: ansible_test_source_1
    source_ip_prefix: 1.1.1.1
    destination_ip_prefix: 2.2.2.2
    source_port_from: 20
    source_port_to: 22
    destination_port_from: 25
    destination_port_to: 110
    ip_protocol: 6
    state: absent

Authors

  • Sabari Jaganathan (@sajagana)