forked from cisco-en-programmability/dnacenter-ansible
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from madhansansel/main
latest changes 02/06
- Loading branch information
Showing
38 changed files
with
15,173 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
namespace: cisco | ||
name: dnac | ||
version: 6.10.2 | ||
version: 6.10.4 | ||
readme: README.md | ||
authors: | ||
- Rafael Campos <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
- hosts: dnac_servers | ||
vars_files: | ||
- credentials.yml | ||
gather_facts: no | ||
connection: local | ||
tasks: | ||
- name: Create Credentials and assign it to a site. | ||
cisco.dnac.device_credential_workflow_manager: | ||
dnac_host: "{{ dnac_host }}" | ||
dnac_port: "{{ dnac_port }}" | ||
dnac_username: "{{ dnac_username }}" | ||
dnac_password: "{{ dnac_password }}" | ||
dnac_verify: "{{ dnac_verify }}" | ||
dnac_debug: "{{ dnac_debug }}" | ||
dnac_log: True | ||
state: merged | ||
config: | ||
- global_credential_details: | ||
cli_credential: | ||
- description: CLI1 | ||
username: cli1 | ||
password: '12345' | ||
enable_password: '12345' | ||
# old_description: | ||
# old_username: | ||
snmp_v2c_read: | ||
- description: SNMPv2c Read1 # use this for deletion | ||
read_community: '123456' | ||
# old_description: # use this for updating the description | ||
snmp_v2c_write: | ||
- description: SNMPv2c Write1 # use this for deletion | ||
write_community: '123456' | ||
# old_description: # use this for updating the description | ||
snmp_v3: | ||
- auth_password: '12345678' # Atleast 8 characters | ||
auth_type: SHA # [SHA, MD5] (SHA is recommended) | ||
snmp_mode: AUTHPRIV # [AUTHPRIV, AUTHNOPRIV, NOAUTHNOPRIV] | ||
privacy_password: '12345678' # Atleast 8 characters | ||
privacy_type: AES128 # [AE128, AE192, AE256] | ||
username: snmpV31 | ||
description: snmpV31 | ||
# old_description: | ||
https_read: | ||
- description: HTTP Read1 | ||
username: HTTP_Read1 | ||
password: '12345' | ||
port: 443 | ||
# old_description: | ||
# old_username: | ||
https_write: | ||
- description: HTTP Write1 | ||
username: HTTP_Write1 | ||
password: '12345' | ||
port: 443 | ||
# old_description: | ||
# old_username: | ||
assign_credentials_to_site: | ||
cli_credential: | ||
description: CLI | ||
username: cli | ||
snmp_v2c_read: | ||
description: SNMPv2c Read | ||
snmp_v2c_write: | ||
description: SNMPv2c Write | ||
snmp_v3: | ||
description: snmpV3 | ||
https_read: | ||
description: HTTP Read | ||
username: HTTP_Read | ||
https_write: | ||
description: HTTP Write | ||
username: HTTP_Write | ||
site_name: | ||
- Global/Chennai/Trill | ||
- Global/Chennai/Tidel | ||
|
||
- name: Delete Credentials | ||
cisco.dnac.device_credential_workflow_manager: | ||
dnac_host: "{{ dnac_host }}" | ||
dnac_port: "{{ dnac_port }}" | ||
dnac_username: "{{ dnac_username }}" | ||
dnac_password: "{{ dnac_password }}" | ||
dnac_verify: "{{ dnac_verify }}" | ||
dnac_debug: "{{ dnac_debug }}" | ||
dnac_log: True | ||
state: deleted | ||
config: | ||
- global_credential_details: | ||
cli_credential: | ||
- description: CLI1 | ||
username: cli1 | ||
snmp_v2c_read: | ||
- description: SNMPv2c Read1 # use this for deletion | ||
snmp_v2c_write: | ||
- description: SNMPv2c Write1 # use this for deletion | ||
snmp_v3: | ||
- description: snmpV31 | ||
https_read: | ||
- description: HTTP Read1 | ||
username: HTTP_Read1 | ||
https_write: | ||
- description: HTTP Write1 | ||
username: HTTP_Write1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
- name: Configure device credentials on Cisco DNA Center | ||
hosts: localhost | ||
connection: local | ||
gather_facts: no | ||
vars_files: | ||
- "input_inventory.yml" | ||
- "credentials.yml" | ||
tasks: | ||
- name: Add/Update/Resync/Delete the devices in Cisco DNA Center Inventory. | ||
cisco.dnac.inventory_workflow_manager: | ||
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_level: DEBUG | ||
dnac_log: true | ||
config_verify: true | ||
state: merged | ||
config: | ||
- username: "{{item.username}}" | ||
enable_password: "{{item.enable_password}}" | ||
password: "{{item.password}}" | ||
ip_address: "{{item.ip_address}}" | ||
cli_transport: "{{item.cli_transport}}" | ||
# hostname_list: "{{item.hostname_list}}" | ||
# serial_number_list: "{{item.serial_number_list}}" | ||
# mac_address_list: "{{item.mac_address_list}}" | ||
snmp_auth_passphrase: "{{item.snmp_auth_passphrase}}" | ||
snmp_auth_protocol: "{{item.snmp_auth_protocol}}" | ||
snmp_mode: "{{item.snmp_mode}}" | ||
snmp_priv_passphrase: "{{item.snmp_priv_passphrase}}" | ||
snmp_priv_protocol: "{{item.snmp_priv_protocol}}" | ||
snmp_ro_community: "{{item.snmp_ro_community}}" | ||
snmp_rw_community: "{{item.snmp_rw_community}}" | ||
snmp_username: "{{item.snmp_username}}" | ||
device_updated: "{{item.device_updated}}" | ||
credential_update: "{{item.credential_update}}" | ||
clean_config: "{{item.clean_config}}" | ||
type: "{{item.type}}" | ||
device_added: "{{item.device_added}}" | ||
device_resync: "{{item.device_resync}}" | ||
reboot_device: "{{item.reboot_device}}" | ||
update_device_role: | ||
role: "{{item.role}}" | ||
role_source: "{{item.role_source}}" | ||
add_user_defined_field: | ||
name: "{{item.name}}" | ||
description: "{{item.description}}" | ||
value: "{{item.value}}" | ||
provision_wired_device: | ||
site_name: "{{item.site_name}}" | ||
update_interface_details: | ||
description: "{{item.update_interface_details.description}}" | ||
interface_name: "{{item.interface_name}}" | ||
export_device_list: | ||
password: "{{item.export_device_list.password}}" | ||
|
||
with_items: "{{ device_details }}" | ||
tags: | ||
- inventory_device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
- hosts: dnac_servers | ||
vars_files: | ||
- credentials.yml | ||
gather_facts: no | ||
connection: local | ||
tasks: | ||
- name: Create global pool, reserve subpool and network functions | ||
cisco.dnac.network_settings_workflow_manager: | ||
dnac_host: "{{ dnac_host }}" | ||
dnac_port: "{{ dnac_port }}" | ||
dnac_username: "{{ dnac_username }}" | ||
dnac_password: "{{ dnac_password }}" | ||
dnac_verify: "{{ dnac_verify }}" | ||
dnac_debug: "{{ dnac_debug }}" | ||
dnac_log: True | ||
dnac_log_level: "{{ dnac_log_level }}" | ||
dnac_log_append: True | ||
dnac_log_file_path: "{{ dnac_log_file_path }}" | ||
state: merged | ||
config_verify: True | ||
config: | ||
- global_pool_details: | ||
settings: | ||
ip_pool: | ||
- name: Global_Pool2 | ||
gateway: '' #use this for updating | ||
ip_address_space: IPv6 #required when we are creating | ||
cidr: 2001:db8::/64 #required when we are creating | ||
type: Generic | ||
dhcp_server_ips: [] #use this for updating | ||
dns_server_ips: [] #use this for updating | ||
# prev_name: Global_Pool2 | ||
reserve_pool_details: | ||
ipv6_address_space: True | ||
ipv4_global_pool: 100.0.0.0/8 | ||
ipv4_prefix: True | ||
ipv4_prefix_length: 9 | ||
ipv4_subnet: 100.128.0.0 | ||
# ipv4_dns_servers: [100.128.0.1] | ||
name: IP_Pool_3 | ||
ipv6_prefix: True | ||
ipv6_prefix_length: 64 | ||
ipv6_global_pool: 2001:db8::/64 | ||
ipv6_subnet: '2001:db8::' | ||
site_name: Global/Chennai/Trill | ||
slaac_support: True | ||
# prev_name: IP_Pool_4 | ||
type: LAN | ||
network_management_details: | ||
settings: | ||
dhcp_server: | ||
- 10.0.0.1 | ||
dns_server: | ||
domain_name: cisco.com | ||
primary_ip_address: 10.0.0.2 | ||
secondary_ip_address: 10.0.0.3 | ||
client_and_endpoint_aaa: #works only if we system settigns is set | ||
ip_address: 10.197.156.42 #Mandatory for ISE, sec ip for AAA | ||
network: 10.0.0.20 | ||
protocol: RADIUS | ||
servers: AAA | ||
# shared_secret: string #ISE | ||
message_of_the_day: | ||
banner_message: hello | ||
retain_existing_banner: 'true' | ||
netflow_collector: | ||
ip_address: 10.0.0.4 | ||
port: 443 | ||
network_aaa: #works only if we system settigns is set | ||
ip_address: 10.0.0.21 #Mandatory for ISE, sec ip for AAA | ||
network: 10.0.0.20 | ||
protocol: TACACS | ||
servers: AAA | ||
# shared_secret: string #ISE | ||
ntp_server: | ||
- 10.0.0.5 | ||
snmp_server: | ||
configure_dnac_ip: false | ||
# ip_addresses: | ||
# - 10.0.0.6 | ||
syslog_server: | ||
configure_dnac_ip: false | ||
# ip_addresses: | ||
# - 10.0.0.7 | ||
timezone: GMT | ||
site_name: Global/Chennai | ||
|
||
- name: Delete Global Pool and Release Pool Reservation | ||
cisco.dnac.network_settings_workflow_manager: | ||
dnac_host: "{{ dnac_host }}" | ||
dnac_port: "{{ dnac_port }}" | ||
dnac_username: "{{ dnac_username }}" | ||
dnac_password: "{{ dnac_password }}" | ||
dnac_verify: "{{ dnac_verify }}" | ||
dnac_debug: "{{ dnac_debug }}" | ||
dnac_log: True | ||
dnac_log_level: "{{ dnac_log_level }}" | ||
state: deleted | ||
config_verify: True | ||
config: | ||
- global_pool_details: | ||
settings: | ||
ip_pool: | ||
- name: Global_Pool2 | ||
reserve_pool_details: | ||
name: IP_Pool_3 | ||
site_name: Global/Chennai/Trill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
- hosts: localhost | ||
connection: local | ||
gather_facts: no | ||
vars_files: | ||
- "credentials.yml" | ||
tasks: | ||
- name: Get site info and updating site details | ||
cisco.dnac.site_workflow_manager: | ||
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: DEBUG | ||
config_verify: true | ||
state: merged | ||
config: | ||
- site: | ||
floor: | ||
name: Test_Floor6 | ||
parent_name: 'Global/USA/San Francisco/BGL_18' | ||
length: "103" | ||
width: "75" | ||
height: "50" | ||
rf_model: 'Cubes And Walled Offices' | ||
floor_number: 3 | ||
type: floor | ||
- site: | ||
area: | ||
name: Abc | ||
parent_name: 'Global' | ||
address: Bengaluru, Karnataka, India | ||
latitude: 22.2111 | ||
longitude: -42.1234434 | ||
country: "United States" | ||
type: area | ||
|
||
# For deleting a site | ||
# - site: | ||
# floor: | ||
# name: Test_Floor2 | ||
# parent_name: 'Global/USA/San Francisco/BGL_18' | ||
# type: floor | ||
|
Oops, something went wrong.