summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cisco/dnac/playbooks/device_provision.yml
blob: fe3efe91907a9e29f72d2e2d817a7eede3ad8fb0 (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
---
- name: Provision and Re-provision wired and wireless devices
  hosts: localhost
  connection: local
  gather_facts: no

  vars_files:
    - "{{ CLUSTERFILE }}"

  vars:
    dnac_login: &dnac_login
      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 }}"

  tasks:
    - name: Provision a wired device to a site
      cisco.dnac.provision_intent:
        <<: *dnac_login
        dnac_log: True
        state: merged
        config:
          - site_name: Global/USA/San Francisco/BGL_18
            management_ip_address: 204.1.2.2


    - name: Unprovision a wired device to a site
      cisco.dnac.provision_intent:
        <<: *dnac_login
        dnac_log: True
        state: deleted
        config:
          - management_ip_address: 204.1.2.2