.. Document meta :orphan: .. |antsibull-internal-nbsp| unicode:: 0xA0 :trim: .. role:: ansible-attribute-support-label .. role:: ansible-attribute-support-property .. role:: ansible-attribute-support-full .. role:: ansible-attribute-support-partial .. role:: ansible-attribute-support-none .. role:: ansible-attribute-support-na .. role:: ansible-option-type .. role:: ansible-option-elements .. role:: ansible-option-required .. role:: ansible-option-versionadded .. role:: ansible-option-aliases .. role:: ansible-option-choices .. role:: ansible-option-choices-default-mark .. role:: ansible-option-default-bold .. role:: ansible-option-configuration .. role:: ansible-option-returned-bold .. role:: ansible-option-sample-bold .. Anchors .. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module: .. Anchors: short name for ansible.builtin .. Anchors: aliases .. Title cisco.dnac.user_role_playbook_config_generator module -- Generate YAML playbook for user and role management. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: This module is part of the `cisco.dnac collection `_ (version 6.49.0). To install it, use: :code:`ansible-galaxy collection install cisco.dnac`. You need further requirements to be able to use this module, see :ref:`Requirements ` for details. To use it in a playbook, specify: :code:`cisco.dnac.user_role_playbook_config_generator`. .. version_added .. rst-class:: ansible-version-added New in cisco.dnac 6.44.0 .. contents:: :local: :depth: 1 .. Deprecated Synopsis -------- .. Description - Generates YAML configurations compatible with the \ :literal:`user\_role\_workflow\_manager`\ module from existing Catalyst Center user and role configurations. - Automates brownfield discovery by extracting current user accounts and custom role definitions into playbook format. - Reduces manual effort in creating Ansible playbooks for user and role management operations. - Supports selective extraction using filters for usernames, emails, and role names. - Generated YAML can be directly used with \ :literal:`user\_role\_workflow\_manager`\ for configuration management and disaster recovery scenarios. .. Aliases .. Requirements .. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module_requirements: Requirements ------------ The below requirements are needed on the host that executes this module. - dnacentersdk \>= 2.7.2 - python \>= 3.9 .. Options Parameters ---------- .. rst-class:: ansible-option-table .. list-table:: :width: 100% :widths: auto :header-rows: 1 * - Parameter - Comments * - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config: .. rst-class:: ansible-option-title **config** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
A dictionary of filters for generating YAML playbook compatible with the \ :literal:`user\_role\_workflow\_manager`\ module. If \ :literal:`config`\ is omitted, module internally sets \ :literal:`generate\_all\_configurations=true`\ and retrieves all supported components. If \ :literal:`config`\ is provided, \ :literal:`component\_specific\_filters`\ is mandatory. Under \ :literal:`config`\ , only \ :literal:`component\_specific\_filters`\ is allowed. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters: .. rst-class:: ansible-option-title **component_specific_filters** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
Filters to specify which components to include in the YAML configuration file and criteria for filtering data. Mandatory when \ :literal:`config`\ is provided. If \ :literal:`components\_list`\ is specified, only those components are included in the output file. If component filter blocks (for example \ :literal:`user\_details`\ or \ :literal:`role\_details`\ ) are provided, corresponding components are auto-added into \ :literal:`components\_list`\ . If no component filter blocks are provided, \ :literal:`components\_list`\ must be provided and non-empty. Each component can have specific filters to select subset of configurations based on attributes. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters/components_list: .. rst-class:: ansible-option-title **components_list** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
List of component names to include in the YAML output. Supported components are \ :literal:`user\_details`\ and \ :literal:`role\_details`\ . If component filter blocks are not specified, this option is mandatory and must be non-empty. If component filter blocks are specified, missing components are auto-added. Order in the list does not affect output structure. Invalid component names will cause module to fail with error message listing allowed components. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`"user\_details"` - :ansible-option-choices-entry:`"role\_details"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters/role_details: .. rst-class:: ansible-option-title **role_details** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
- .. raw:: html
List of filter parameter dictionaries to select specific roles for inclusion in YAML output. Multiple filter parameter sets use OR logic (any match includes the role). If not specified, all custom roles are included (system roles are always excluded). System roles (SUPER-ADMIN, NETWORK-ADMIN, OBSERVER) and roles with type 'default' or 'system' are automatically excluded. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters/role_details/role_name: .. rst-class:: ansible-option-title **role_name** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
List of role names to filter roles by exact name match. Matching is case-sensitive for role names. Only custom roles matching these names will be included in output. System and default roles are excluded regardless of filter. Example \ :literal:`['Custom-Admin-Role', 'Network-Operator-Role']`\ includes only these custom roles. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters/user_details: .. rst-class:: ansible-option-title **user_details** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
- .. raw:: html
List of filter parameter dictionaries to select specific users for inclusion in YAML output. Multiple filter parameter sets use OR logic (any match includes the user). Within a single filter parameter set, all criteria must match (AND logic). If not specified, all users are included (subject to \ :literal:`components\_list`\ setting). All filter values are case-insensitive. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters/user_details/email: .. rst-class:: ansible-option-title **email** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
List of email addresses to filter users by exact email match. Matching is case-insensitive. Users with email addresses in this list will be included in output. Example \ :literal:`['user1@example.com', 'user2@example.com']`\ filters by email. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters/user_details/role_name: .. rst-class:: ansible-option-title **role_name** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
List of role names to filter users by assigned role. Matching is case-insensitive. Users having any of the specified roles will be included in output. Role names should match exactly as defined in Catalyst Center. Example \ :literal:`['SUPER-ADMIN-ROLE', 'Custom-Admin-Role']`\ includes users with these roles. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-config/component_specific_filters/user_details/username: .. rst-class:: ansible-option-title **username** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
List of usernames to filter users by exact username match. Matching is case-insensitive. Users with usernames in this list will be included in output. Example \ :literal:`['testuser1', 'testuser2']`\ includes only these two users. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_api_task_timeout: .. rst-class:: ansible-option-title **dnac_api_task_timeout** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`integer` .. raw:: html
- .. raw:: html
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. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`1200` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_debug: .. rst-class:: ansible-option-title **dnac_debug** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Indicates whether debugging is enabled in the Cisco Catalyst Center SDK. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_host: .. rst-class:: ansible-option-title **dnac_host** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
The hostname of the Cisco Catalyst Center. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_log: .. rst-class:: ansible-option-title **dnac_log** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
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. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_log_append: .. rst-class:: ansible-option-title **dnac_log_append** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_log_file_path: .. rst-class:: ansible-option-title **dnac_log_file_path** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
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. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"dnac.log"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_log_level: .. rst-class:: ansible-option-title **dnac_log_level** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
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. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"WARNING"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_password: .. rst-class:: ansible-option-title **dnac_password** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
The password for authentication at the Cisco Catalyst Center. .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_port: .. rst-class:: ansible-option-title **dnac_port** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Specifies the port number associated with the Cisco Catalyst Center. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"443"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_task_poll_interval: .. rst-class:: ansible-option-title **dnac_task_poll_interval** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`integer` .. raw:: html
- .. raw:: html
Specifies the interval in seconds between successive calls to the API to retrieve task details. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`2` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_username: .. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-user: .. rst-class:: ansible-option-title **dnac_username** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-aliases:`aliases: user` .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
The username for authentication at the Cisco Catalyst Center. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"admin"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_verify: .. rst-class:: ansible-option-title **dnac_verify** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Flag to enable or disable SSL certificate verification. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-dnac_version: .. rst-class:: ansible-option-title **dnac_version** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Specifies the version of the Cisco Catalyst Center that the SDK should use. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"2.2.3.3"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-file_mode: .. rst-class:: ansible-option-title **file_mode** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
File write mode for the generated YAML configuration file. The overwrite option replaces existing file content with new content. The append option adds new content to the end of existing file. Relevant only when \ :literal:`file\_path`\ is provided. Defaults to overwrite if not specified. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`"overwrite"` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`"append"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-file_path: .. rst-class:: ansible-option-title **file_path** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Absolute or relative path where the YAML configuration file will be saved. If not provided, the file is saved in the current working directory with auto-generated filename. Default filename pattern is \ :literal:`user\_role\_playbook\_config\_\.yml`\ . .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-state: .. rst-class:: ansible-option-title **state** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
The desired state for the module operation. Only \ :literal:`gathered`\ state is supported for extracting existing configurations from Catalyst Center. The \ :literal:`gathered`\ state retrieves user and role data via API and transforms it into YAML playbook format. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`"gathered"` :ansible-option-choices-default-mark:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__parameter-validate_response_schema: .. rst-class:: ansible-option-title **validate_response_schema** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` .. raw:: html
.. Attributes .. Notes Notes ----- .. note:: - Minimum supported Catalyst Center version is 2.3.5.3 which introduced user and role retrieval APIs. - System roles (SUPER-ADMIN, NETWORK-ADMIN, OBSERVER) are automatically excluded from role\_details output. - Roles with type 'default' or 'system' are automatically excluded from output. - Generated YAML file structure matches the input format expected by \ :literal:`user\_role\_workflow\_manager`\ module. - Role permissions are transformed from API resourceTypes format to hierarchical permission structure with 9 categories. - User role assignments are transformed from role IDs to role names for readability. - All filter values are expected as lists of strings, even for single values. - Check mode is supported but does not generate files (dry-run). - SDK Methods used are - user\_and\_roles.UserandRoles.get\_users\_api - user\_and\_roles.UserandRoles.get\_roles\_api - Paths used are - GET /dna/system/api/v1/user - GET /dna/system/api/v1/role - Does not support \ :literal:`check\_mode`\ - The 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 .. Seealso See Also -------- .. seealso:: \ :ref:`cisco.dnac.user\_role\_workflow\_manager `\ Module to manage users and roles using generated YAML. .. Examples Examples -------- .. code-block:: yaml+jinja - name: Generate YAML Configuration with File Path specified cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_user_role_config.yaml" - name: Generate YAML Configuration with specific user components only cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_user_role_config.yaml" file_mode: "overwrite" config: component_specific_filters: components_list: ["user_details"] - name: Generate YAML Configuration with specific role components only cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_user_role_config.yaml" config: component_specific_filters: components_list: ["role_details"] - name: Generate YAML Configuration for users with username filter cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_user_role_config.yaml" config: component_specific_filters: components_list: ["user_details"] user_details: - username: ["testuser1", "testuser2"] - name: Generate YAML Configuration for roles with role name filter cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_user_role_config.yaml" config: component_specific_filters: components_list: ["role_details"] role_details: - role_name: ["Custom-Admin-Role", "Network-Operator-Role"] - name: Generate YAML Configuration for all components with no filters cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_user_role_config.yaml" config: component_specific_filters: components_list: ["user_details", "role_details"] - name: Generate YAML for users with specific email addresses cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_users_by_email.yaml" config: component_specific_filters: components_list: ["user_details"] user_details: - email: ["admin@example.com", "operator@example.com"] - name: Append YAML for users with specific role assignments to existing file cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_admin_users.yaml" file_mode: "append" config: component_specific_filters: components_list: ["user_details"] user_details: - role_name: ["SUPER-ADMIN-ROLE", "Custom-Admin-Role"] - name: Generate YAML with multiple filter criteria (OR logic) cisco.dnac.user_role_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: "{{dnac_log_level}}" state: gathered file_path: "/tmp/catc_filtered_users.yaml" config: component_specific_filters: components_list: ["user_details"] user_details: - username: ["testuser1"] - email: ["admin@example.com"] .. Facts .. Return values Return Values ------------- Common return values are documented :ref:`here `, the following are the fields unique to this module: .. rst-class:: ansible-option-table .. list-table:: :width: 100% :widths: auto :header-rows: 1 * - Key - Description * - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__return-response_1: .. rst-class:: ansible-option-title **response_1** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
A dictionary with the response returned by the Cisco Catalyst Center .. rst-class:: ansible-option-line :ansible-option-returned-bold:`Returned:` always .. rst-class:: ansible-option-line .. rst-class:: ansible-option-sample :ansible-option-sample-bold:`Sample:` :ansible-rv-sample-value:`{"msg": "YAML configuration file generated successfully for module 'user\_role\_workflow\_manager'", "response": {"components\_processed": 2, "components\_skipped": 0, "configurations\_count": 15, "file\_path": "user\_role\_details/user\_info", "message": "YAML configuration file generated successfully for module 'user\_role\_workflow\_manager'", "status": "success"}, "status": "success"}` .. raw:: html
* - .. raw:: html
.. _ansible_collections.cisco.dnac.user_role_playbook_config_generator_module__return-response_2: .. rst-class:: ansible-option-title **response_2** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
A dictionary with the response returned by the Cisco Catalyst Center .. rst-class:: ansible-option-line :ansible-option-returned-bold:`Returned:` always .. rst-class:: ansible-option-line .. rst-class:: ansible-option-sample :ansible-option-sample-bold:`Sample:` :ansible-rv-sample-value:`["\\"msg\\": {\\n \\"YAML config generation Task failed for module 'user\_role\_workflow\_manager'.\\": {\\n \\"file\_path\\": \\"/Users/priyadharshini/Downloads/specific\_userrole\_details\_info\\"\\n }\\n}", " \\"response\\": {\\n \\"YAML config generation Task failed for module 'user\_role\_workflow\_manager'.\\": {\\n \\"file\_path\\": \\"/Users/priyadharshini/Downloads/specific\_userrole\_details\_info\\"\\n }\\n}\\n"]` .. raw:: html
.. Status (Presently only deprecated) .. Authors Authors ~~~~~~~ - Priyadharshini B (@pbalaku2) - Madhan Sankaranarayanan (@madhansansel) .. Extra links Collection links ~~~~~~~~~~~~~~~~ .. raw:: html .. Parsing errors