cisco.dnac.network_settings_intent module – Resource module for IP Address pools and network functions
Note
This module is part of the cisco.dnac collection (version 6.10.4).
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.network_settings_intent
.
New in cisco.dnac 6.6.0
Synopsis
Manage operations on Global Pool, Reserve Pool, Network resources.
API to create/update/delete global pool.
API to reserve/update/delete an ip subpool from the global pool.
API to update network settings for DHCP, Syslog, SNMP, NTP, Network AAA, Client and Endpoint AAA, and/or DNS center server settings.
Requirements
The below requirements are needed on the host that executes this module.
dnacentersdk == 2.4.5
python >= 3.5
Parameters
Parameter |
Comments |
---|---|
List of details of global pool, reserved pool, network being managed. |
|
Global ip pool manages IPv4 and IPv6 IP pools. |
|
Global Pool’s settings. |
|
Global Pool’s ippool. |
|
Ip pool cidr. |
|
Dhcp Server Ips. |
|
Dns Server Ips. |
|
Gateway. |
|
Ip address space. |
|
Ip Pool Name. |
|
previous name. |
|
Set default network settings for the site |
|
Network management details settings. |
|
Network V2’s clientAndEndpoint_aaa. |
|
IP address for ISE serve (eg 1.1.1.4). |
|
IP address for AAA or ISE server (eg 2.2.2.1). |
|
Protocol for AAA or ISE serve (eg RADIUS). |
|
Server type AAA or ISE server (eg AAA). |
|
Shared secret for ISE server. |
|
DHCP Server IP (eg 1.1.1.1). |
|
Network V2’s dnsServer. |
|
Domain Name of DHCP (eg; cisco). |
|
Primary IP Address for DHCP (eg 2.2.2.2). |
|
Secondary IP Address for DHCP (eg 3.3.3.3). |
|
Network V2’s messageOfTheday. |
|
Massage for Banner message (eg; Good day). |
|
Retain existing Banner Message (eg “true” or “false”). |
|
Network V2’s netflowcollector. |
|
IP Address for NetFlow collector (eg 3.3.3.1). |
|
Port for NetFlow Collector (eg; 443). |
|
Network V2’s network_aaa. |
|
IP address for AAA and ISE server (eg 1.1.1.1). |
|
IP Address for AAA or ISE server (eg 2.2.2.2). |
|
Protocol for AAA or ISE serve (eg RADIUS). |
|
Server type for AAA Network (eg AAA). |
|
Shared secret for ISE Server. |
|
IP address for NTP server (eg 1.1.1.2). |
|
Network V2’s snmpServer. |
|
Configuration Cisco DNA Center IP for SNMP Server (eg true). Choices: |
|
IP Address for SNMP Server (eg 4.4.4.1). |
|
Network V2’s syslogServer. |
|
Configuration Cisco DNA Center IP for syslog server (eg true). Choices: |
|
IP Address for syslog server (eg 4.4.4.4). |
|
Input for time zone (eg Africa/Abidjan). |
|
Site name path parameter. |
|
Reserving IP subpool from the global pool |
|
IPv4 input for dns server ip example 4.4.4.4. |
|
IP v4 Global pool address with cidr, example 175.175.0.0/16. |
|
ip4 prefix length is enabled or ipv4 total Host input is enabled Choices: |
|
The ipv4 prefix length is required when ipv4_prefix value is true. |
|
IPv4 Subnet address, example 175.175.0.0. |
|
IPv4 input for dhcp server ip example 1.1.1.1. |
|
Gateway ip address details, example 175.175.0.1. |
|
IPv4 total host is required when ipv4_prefix value is false. |
|
If the value is false only ipv4 input are required, otherwise both ipv6 and ipv4 are required. Choices: |
|
IPv6 Global pool address with cidr this is required when ipv6_address_space value is true, example 2001 db8 85a3 /64. |
|
Ipv6 prefix value is true, the ip6 prefix length input field is enabled, if it is false ipv6 total Host input is enable. Choices: |
|
IPv6 prefix length is required when the ipv6_prefix value is true. |
|
IPv6 Subnet address, example 2001 db8 85a3 0 100. |
|
IPv6 format dhcp server as input example 2001 db8 1234. |
|
IPv6 format dns server input example 2001 db8 1234. |
|
Gateway ip address details, example 2001 db8 85a3 0 100 1. |
|
IPv6 total host is required when ipv6_prefix value is false. |
|
Name of the reserve ip sub pool. |
|
Previous name of the reserve ip sub pool. |
|
Site name path parameter. Site name to reserve the ip sub pool. |
|
Type of the reserve ip sub pool. |
|
Set to True to verify the Cisco DNA Center after applying the playbook config. Choices: |
|
Flag for Cisco DNA Center SDK to enable debugging. Choices: |
|
The Cisco DNA Center hostname. |
|
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 Cisco DNA Center password to authenticate. |
|
The Cisco DNA Center port. Default: :ansible-option-default:`"443"` |
|
The Cisco DNA Center username to authenticate. Default: :ansible-option-default:`"admin"` |
|
Flag to enable or disable SSL certificate verification. Choices: |
|
Informs the SDK which version of Cisco DNA Center to use. Default: :ansible-option-default:`"2.2.3.3"` |
|
The state of Cisco DNA Center after module completion. Choices: |
|
Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema. Choices: |
Notes
Note
SDK Method used are network_settings.NetworkSettings.create_global_pool, network_settings.NetworkSettings.delete_global_ip_pool, network_settings.NetworkSettings.update_global_pool, network_settings.NetworkSettings.release_reserve_ip_subpool, network_settings.NetworkSettings.reserve_ip_subpool, network_settings.NetworkSettings.update_reserve_ip_subpool, network_settings.NetworkSettings.update_network_v2,
Paths used are post /dna/intent/api/v1/global-pool, delete /dna/intent/api/v1/global-pool/{id}, put /dna/intent/api/v1/global-pool, post /dna/intent/api/v1/reserve-ip-subpool/{siteId}, delete /dna/intent/api/v1/reserve-ip-subpool/{id}, put /dna/intent/api/v1/reserve-ip-subpool/{siteId}, put /dna/intent/api/v2/network/{siteId},
Does not support
check_mode
The plugin runs on the control node and does not use any ansible connection plugins, but instead the embedded connection manager from Cisco DNAC SDK
The parameters starting with dnac_ are used by the Cisco DNAC Python SDK to establish the connection
Examples
- name: Create global pool, reserve an ip pool and network
cisco.dnac.network_settings_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
dnac_log_level: "{{ dnac_log_level }}"
state: merged
config_verify: True
config:
- global_pool_details:
settings:
ip_pool:
- name: string
gateway: string
ip_address_space: string
cidr: string
type: Generic
dhcp_server_ips: list
dns_server_ips: list
reserve_pool_details:
ipv6_address_space: True
ipv4_global_pool: string
ipv4_prefix: True
ipv4_prefix_length: 9
ipv4_subnet: string
name: string
ipv6_prefix: True
ipv6_prefix_length: 64
ipv6_global_pool: string
ipv6_subnet: string
site_name: string
slaac_support: True
type: LAN
network_management_details:
settings:
dhcp_server: list
dns_server:
domain_name: string
primary_ip_address: string
secondary_ip_address: string
client_and_endpoint_aaa:
network: string
protocol: string
servers: string
message_of_the_day:
banner_message: string
retain_existing_banner: string
netflow_collector:
ip_address: string
port: 443
network_aaa:
network: string
protocol: string
servers: string
ntp_server: list
snmp_server:
configure_dnac_ip: True
ip_addresses: list
syslog_server:
configure_dnac_ip: True
ip_addresses: list
site_name: string
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary or list with the response returned by the Cisco DNA Center Python SDK Returned: always |
|
A dictionary or list with the response returned by the Cisco DNA Center Python SDK Returned: always |
|
A dictionary or list with the response returned by the Cisco DNA Center Python SDK Returned: always |