-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcleanup.yml
More file actions
79 lines (64 loc) · 1.58 KB
/
cleanup.yml
File metadata and controls
79 lines (64 loc) · 1.58 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
# MSO Lab Playbook
- name: Configuring a Schema on MSO
hosts: mso
connection: local
gather_facts: no
vars:
tenant: Spectrum-Ansible
schema: Spectrum-2
template: Template 1
vrf: VRF1
bd: BD1
ap: ANP1
epg1: Web
epg2: DB
l3out: L3Out
extEpg1: Internet
contract1: Web-to-DB
contract2: Web-to-Internet
filter1: Any
site: On-premises
mso_a: &mso_anchor
host: "{{ ansible_ssh_host }}"
username: "{{ mso_user }}"
password: "{{ mso_password }}"
template_a: &template_anchor
schema: "{{ schema }}"
template: "{{ template }}"
tasks:
- name: Undeploy a schema template
mso_schema_template_deploy:
<<: *mso_anchor
<<: *template_anchor
site: "{{ site }}"
state: undeploy
validate_certs: no
delegate_to: localhost
# - name: Remove Site from Schema
# mso_schema_site:
# <<: *mso_anchor
# <<: *template_anchor
# site: "{{ site }}"
# state: absent
# validate_certs: no
# delegate_to: localhost
- name: Delete Schema
mso_schema:
<<: *mso_anchor
schema: "{{ schema }}"
state: absent
validate_certs: no
delegate_to: localhost
- name: Delete tenant
delegate_to: localhost
mso_tenant:
<<: *mso_anchor
tenant: "{{ tenant }}"
display_name: "{{ tenant }}"
description: MSO Ansible Tenant
users: "{{ mso_user }}"
sites:
- "{{ site }}"
state: absent
validate_certs: no