cisco.dnac.provision_intent (6.13.3) — module

Resource module for provision functions

| "added in version" 6.6.0 of cisco.dnac"

Authors: Abinash Mishra (@abimishr)

Install collection

Install with ansible-galaxy collection install cisco.dnac:==6.13.3


Add to requirements.yml

  collections:
    - name: cisco.dnac
      version: 6.13.3

Description

Manage operation related to wired and wireless provisioning

API to re-provision provisioned devices

API to un-provision provisioned devices


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create/Modify a new provision
  cisco.dnac.provision_intent:
    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: merged
    config:
        - site_name: string
          management_ip_address: string
          managed_ap_locations: list
          dynamic_interfaces:
            - vlan_id: integer
              interface_name: string
              interface_ip_address: string
              interface_gateway: string
              interface_netmask_in_c_i_d_r: integer
              lag_or_port_number: integer

Inputs

    
state:
    choices:
    - merged
    - deleted
    default: merged
    description: The state of DNAC after module completion.
    type: str

config:
    description:
    - List of details of device being managed.
    elements: dict
    required: true
    suboptions:
      dynamic_interfaces:
        description: Interface details of the controller
        elements: dict
        suboptions:
          interface_gateway:
            description: Ip Address allocated to the interface
            type: str
          interface_ip_address:
            description: Ip Address allocated to the interface
            type: str
          interface_name:
            description: Ip Address allocated to the interface
            type: str
          interface_netmask_in_c_i_d_r:
            description: Ip Address allocated to the interface
            type: int
          lag_or_port_number:
            description: Ip Address allocated to the interface
            type: int
          vlan_id:
            description: Ip Address allocated to the interface
            type: int
        type: list
      managed_ap_locations:
        description: Location of the sites allocated for the APs
        elements: str
        type: list
      management_ip_address:
        description: Management Ip Address .
        required: true
        type: str
      site_name:
        description: Name of site where the device needs to be added.
        type: str
    type: list

dnac_log:
    default: false
    description:
    - 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.
    type: bool

dnac_host:
    description:
    - The Cisco DNA Center hostname.
    required: true
    type: str

dnac_port:
    default: '443'
    description:
    - The Cisco DNA Center port.
    type: str

dnac_debug:
    default: false
    description:
    - Flag for Cisco DNA Center SDK to enable debugging.
    type: bool

dnac_verify:
    default: true
    description:
    - Flag to enable or disable SSL certificate verification.
    type: bool

dnac_version:
    default: 2.2.3.3
    description:
    - Informs the SDK which version of Cisco DNA Center to use.
    type: str

config_verify:
    default: false
    description: Set to True to verify the Cisco Catalyst Center config after applying
      the playbook config.
    type: bool

dnac_password:
    description:
    - The Cisco DNA Center password to authenticate.
    type: str

dnac_username:
    aliases:
    - user
    default: admin
    description:
    - The Cisco DNA Center username to authenticate.
    type: str

dnac_log_level:
    default: WARNING
    description:
    - 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.
    type: str

dnac_log_append:
    default: true
    description: Determines the mode of the file. Set to True for 'append' mode. Set to
      False for 'write' mode.
    type: bool

dnac_log_file_path:
    default: dnac.log
    description:
    - 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.
    type: str

dnac_api_task_timeout:
    default: 1200
    description: 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.
    type: int

dnac_task_poll_interval:
    default: 2
    description: Specifies the interval in seconds between successive calls to the API
      to retrieve task details.
    type: int

validate_response_schema:
    default: true
    description:
    - Flag for Cisco DNA Center SDK to enable the validation of request bodies against
      a JSON schema.
    type: bool

Outputs

response_1:
  description: A dictionary with details of provision is returned
  returned: always
  sample: "{\n  \"response\":\n  {\n    \"response\": String,\n    \"version\": String\n\
    \    },\n  \"msg\": String\n}\n"
  type: dict
response_2:
  description: A list with the response returned by the Cisco DNAC Python SDK
  returned: always
  sample: "{\n  \"response\": [],\n  \"msg\": String\n}\n"
  type: list
response_3:
  description: A dictionary with the exisiting details as returned by the Cisco DNAC
    Python SDK
  returned: always
  sample: "{\n  \"response\": String,\n  \"msg\": String\n}\n"
  type: dict