blob: 687a84e251b526ecc2906cd1912727a79c5423da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
---
- name: Configure device credentials on Cisco DNA Center
hosts: localhost
connection: local
gather_facts: no
vars_files:
- "input_swim.yml"
- "credentials.yml"
tasks:
- name: Import an image, tag it as golden and load it on device {{ item.device_serial_number }}
cisco.dnac.swim_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
config:
- import_image_details:
type: "{{ item.type }}"
url_details:
payload: "{{ item.url_details.payload }}"
tagging_details:
device_role: "{{ item.device_role }}"
device_family_name: "{{ item.device_family_name }}"
device_type: "{{item.device_type}}"
tagging: true
image_distribution_details:
site_name: "{{item.site_name}}"
device_role: "{{ item.device_role }}"
device_family_name: "{{ item.device_family_name }}"
image_activation_details:
site_name: "{{item.site_name}}"
device_role: "{{ item.device_role }}"
device_family_name: "{{ item.device_family_name }}"
scehdule_validate: false
distribute_if_needed: true
with_items: "{{ image_details }}"
tags:
- swim
|