cisco.dnac.sda_fabric_multicast_playbook_config_generator module -- Generate YAML configurations playbook for 'sda_fabric_multicast_workflow_manager' module.
Note
This module is part of the cisco.dnac collection (version 6.49.0).
To install it, use: ansible-galaxy collection install cisco.dnac.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.dnac.sda_fabric_multicast_playbook_config_generator.
New in cisco.dnac 6.44.0
Synopsis
Automates YAML playbook generation from existing SDA fabric multicast deployments in Cisco Catalyst Center.
Creates playbooks compatible with the
sda_fabric_multicast_workflow_managermodule for infrastructure configuration management and documentation.Reduces manual effort by programmatically extracting current multicast configurations including replication modes, SSM ranges, and ASM RPs.
Supports selective filtering to generate playbooks for specific fabric sites or Layer 3 virtual networks.
Enables complete infrastructure discovery with auto-generation mode when
generate_all_configurationsis enabled.Requires Cisco Catalyst Center version 2.3.7.9 or higher.
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk >= 2.9.2
python >= 3.9
Cisco Catalyst Center >= 2.3.7.9
Parameters
Parameter |
Comments |
|---|---|
A dictionary of filters for generating YAML playbook compatible with the Filters specify which components to include in the YAML configuration file. If "components_list" is specified, only those components are included, regardless of the filters. If config is not provided or is empty, all configurations for all fabric sites will be generated. This is useful for complete brownfield infrastructure discovery and documentation. |
|
Filters to specify which components to include in the YAML configuration file. If "components_list" is specified, only those components are included, regardless of other filters. If filters for specific components (e.g., fabric_multicast) are provided without explicitly including them in components_list, those components will be automatically added to components_list. At least one of components_list or component filters must be provided when config is specified. |
|
List of component types to include in the generated YAML playbook. Currently supports If omitted, all supported components are included by default. If specified, only the listed components will be processed. Choices: |
|
Each filter entry can specify Retrieved configurations include replication mode, SSM ranges, ASM RP details, and IP pool assignments. |
|
The hierarchical name of the fabric site from which to retrieve multicast configurations. Must match the exact site hierarchy as configured in Cisco Catalyst Center. Site can be either a fabric site or fabric zone. If the specified site is not configured as a fabric site or fabric zone, the filter entry is skipped with a warning. Example hierarchical path: Case-sensitive matching is performed against cached site mappings. For detailed parameter usage and configuration examples, refer to the |
|
The name of the Layer 3 virtual network (VN) associated with the fabric multicast configuration. Used to filter multicast configurations for a specific virtual network within the fabric site. Can be combined with If specified alone without Example VN names: For detailed parameter usage and configuration examples, refer to the |
|
Defines the timeout in seconds for API calls to retrieve task details. If the task details are not received within this period, the process will end, and a timeout notification will be logged. Default: :ansible-option-default:`1200` |
|
Indicates whether debugging is enabled in the Cisco Catalyst Center SDK. Choices: |
|
The hostname of the Cisco Catalyst Center. |
|
Flag to enable/disable playbook execution logging. When true and dnac_log_file_path is provided, - Create the log file at the execution location with the specified name. When true and dnac_log_file_path is not provided, - Create the log file at the execution location with the name 'dnac.log'. When false, - Logging is disabled. If the log file doesn't exist, - It is created in append or write mode based on the "dnac_log_append" flag. If the log file exists, - It is overwritten or appended based on the "dnac_log_append" flag. Choices: |
|
Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. Choices: |
|
Governs logging. Logs are recorded if dnac_log is True. If path is not specified, - When 'dnac_log_append' is True, 'dnac.log' is generated in the current Ansible directory; logs are appended. - When 'dnac_log_append' is False, 'dnac.log' is generated; logs are overwritten. If path is specified, - When 'dnac_log_append' is True, the file opens in append mode. - When 'dnac_log_append' is False, the file opens in write (w) mode. - In shared file scenarios, without append mode, content is overwritten after each module execution. - For a shared log file, set append to False for the 1st module (to overwrite); for subsequent modules, set append to True. Default: :ansible-option-default:`"dnac.log"` |
|
Sets the threshold for log level. Messages with a level equal to or higher than this will be logged. Levels are listed in order of severity [CRITICAL, ERROR, WARNING, INFO, DEBUG]. CRITICAL indicates serious errors halting the program. Displays only CRITICAL messages. ERROR indicates problems preventing a function. Displays ERROR and CRITICAL messages. WARNING indicates potential future issues. Displays WARNING, ERROR, CRITICAL messages. INFO tracks normal operation. Displays INFO, WARNING, ERROR, CRITICAL messages. DEBUG provides detailed diagnostic info. Displays all log messages. Default: :ansible-option-default:`"WARNING"` |
|
The password for authentication at the Cisco Catalyst Center. |
|
Specifies the port number associated with the Cisco Catalyst Center. Default: :ansible-option-default:`"443"` |
|
Specifies the interval in seconds between successive calls to the API to retrieve task details. Default: :ansible-option-default:`2` |
|
The username for authentication at the Cisco Catalyst Center. Default: :ansible-option-default:`"admin"` |
|
Flag to enable or disable SSL certificate verification. Choices: |
|
Specifies the version of the Cisco Catalyst Center that the SDK should use. Default: :ansible-option-default:`"2.2.3.3"` |
|
Controls how config is written to the YAML file.
This parameter is only relevant when Choices: |
|
Path where the YAML configuration file will be saved. If not provided, the file will be saved in the current working directory with a default file name For example, |
|
The desired state for the module operation.
Choices: |
|
Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
Notes
Note
Requires minimum Cisco Catalyst Center version 2.3.7.9 for SDA fabric multicast API support.
Module will fail with an error if connected to an unsupported version.
Generated playbooks are compatible with the
sda_fabric_multicast_workflow_managermodule for configuration deployment.Device IDs in RP configurations are automatically converted to management IP addresses in the generated playbook.
Replication modes are retrieved from cached fabric configurations to ensure accurate playbook generation.
For FABRIC location RPs, external IP address fields are automatically excluded from the generated playbook.
Site hierarchies must exist in Cisco Catalyst Center and be configured as fabric sites or zones to be included in results.
Use
dnac_loganddnac_log_levelparameters for detailed operation logging and troubleshooting.The module operates in check mode but does not make any changes to Cisco Catalyst Center.
Does not support
check_modeThe plugin runs on the control node and does not use any ansible connection plugins instead embedded connection manager from Cisco Catalyst Center SDK
The parameters starting with dnac_ are used by the Cisco Catalyst Center Python SDK to establish the connection
Examples
# Example 1: Generate all configurations (default behavior when config is omitted)
- name: Generate YAML playbook for all SDA fabric multicast configurations
cisco.dnac.sda_fabric_multicast_playbook_config_generator:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
dnac_log: true
dnac_log_level: INFO
state: gathered
# No config provided - generates all configurations
# Example 2: Generate all configurations with custom file path
- name: Generate complete SDA fabric multicast configuration with custom filename
cisco.dnac.sda_fabric_multicast_playbook_config_generator:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
dnac_log: true
dnac_log_level: INFO
state: gathered
file_path: "/tmp/complete_sda_fabric_multicast_config.yaml"
file_mode: "overwrite"
# No config provided - generates all configurations
# Example 3: Generate fabric multicast configurations for a specific fabric site
- name: Generate YAML playbook for specific fabric site
cisco.dnac.sda_fabric_multicast_playbook_config_generator:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
dnac_log: true
state: gathered
file_path: "/tmp/site_specific_multicast.yaml"
file_mode: "overwrite"
config:
component_specific_filters:
components_list:
- fabric_multicast
fabric_multicast:
- fabric_name: "Global/USA/San Jose/Building1"
# Example 4: Generate configuration for specific fabric and virtual network
- name: Generate YAML playbook for specific fabric and virtual network
cisco.dnac.sda_fabric_multicast_playbook_config_generator:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
state: gathered
file_path: "/tmp/fabric_vn_specific_multicast.yaml"
file_mode: "overwrite"
config:
component_specific_filters:
fabric_multicast:
- fabric_name: "Global/USA/San Jose/Building1"
layer3_virtual_network: "GUEST_VN"
# Example 5: Auto-populate components_list from component filters
- name: Generate configuration with auto-populated components_list
cisco.dnac.sda_fabric_multicast_playbook_config_generator:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
state: gathered
file_path: "/tmp/san_jose_fabric.yaml"
file_mode: "overwrite"
config:
component_specific_filters:
# No components_list specified, but fabric_multicast filters are provided
# The 'fabric_multicast' component will be automatically added to components_list
fabric_multicast:
- fabric_name: "Global/USA/San Jose/Building1"
# Example 6: Generate configuration with append mode
- name: Generate and append SDA fabric multicast configuration
cisco.dnac.sda_fabric_multicast_playbook_config_generator:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
state: gathered
file_path: "/tmp/all_fabric_multicast.yaml"
file_mode: "append"
config:
component_specific_filters:
components_list:
- fabric_multicast
fabric_multicast:
- fabric_name: "Global/Europe/London/DataCenter1"
# Example 7: Generate playbook for multiple fabric sites
- name: Generate playbook for multiple fabric sites
cisco.dnac.sda_fabric_multicast_playbook_config_generator:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
state: gathered
file_path: "/tmp/multiple_sites_multicast.yaml"
file_mode: "overwrite"
config:
component_specific_filters:
fabric_multicast:
- fabric_name: "Global/USA/San Jose/Building1"
- fabric_name: "Global/USA/San Jose/Building2"
- fabric_name: "Global/Europe/London/DataCenter1"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Indicates whether any changes were made. Always Returned: always Sample: :ansible-rv-sample-value:`false` |
|
Status message providing additional context about the operation. Includes details about configurations processed, files generated, or errors encountered. Returned: always |
|
Details of the YAML playbook generation operation. Returned: always |
|
Success or failure message indicating the result of the playbook generation operation. For successful operations, includes the file path where the YAML playbook was saved. For failed operations, includes error details and failure reason. Returned: always |
|
Cisco Catalyst Center version used during the operation. Returned: always |
|
Error response when playbook generation fails. Returned: on failure |
|
Detailed error message explaining the failure reason. May include validation errors, API call failures, or file write errors. Returned: always Sample: :ansible-rv-sample-value:`"Invalid parameters in playbook: ['unknown\_parameter']"` |
|
Current status of the operation (success, failed, invalid). Returned: always |