-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_lappg.yml
55 lines (51 loc) · 1.63 KB
/
test_lappg.yml
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
---
- name: playbook for aci testing
hosts: apic
connection: local
gather_facts: no
vars:
inventory_hostname: 172.31.186.184
user: admin
passwd: Cisco!123
tenant:
- { name: 'QA-Customer1-Tenant' }
application_profile:
- { name: 'QA-Customer1-AppProfile' }
epg:
- { name: 'QA-Customer1-EPG' }
- { name: 'QA-Customer2-EPG' }
vrf:
- { name: 'QA-Customer1-VRF' }
bd:
- { name: 'QA-Customer1-BD', arp_flooding: 'yes' }
attachable_entity_profile:
- { name: 'QA-Customer1-AEP' }
leaf_access_port_policy_group:
- { name: 'QA-Customer1-LAPPG' }
tasks:
- name: generate_tenant_config_file
aci_generate_xml:
tenant: "{{ item[0].name }}"
application_profile: "{{ item[1].name }}"
epg: "{{ item[2].name }}"
vrf: "{{ item[3].name }}"
bd: "{{ item[4].name }}"
arp_flooding: "{{ item[4].arp_flooding }}"
attachable_entity_profile: "{{ item[5].name }}"
leaf_access_port_policy_group: "{{ item[6].name }}"
with_nested:
- "{{ tenant }}"
- "{{ application_profile }}"
- "{{ epg }}"
- "{{ vrf }}"
- "{{ bd }}"
- "{{ attachable_entity_profile }}"
- "{{ leaf_access_port_policy_group }}"
- name: add a lappg
aci_rest:
action: post
uri: /api/mo/uni.xml
config_file: /home/swetha/ansible/aci-ansible/configs/lappg_QA-Customer1-LAPPG.xml
host: "{{ inventory_hostname }}"
username: "{{ user }}"
password: "{{ passwd }}"