-
Notifications
You must be signed in to change notification settings - Fork 0
/
epg.yml
58 lines (58 loc) · 1.55 KB
/
epg.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
56
57
58
---
- aci_bd:
<<: &tn-ol
tenant: '{{ tnn }}'
output_level: '{{ output_level }}'
bd: &bd
'{{ prefs.bd }}_{{ oitem.key }}_{{ item.key }}'
vrf: '{{ vrf }}'
args: '{{ aci_vars }}'
with_dict: '{{ oitem.value }}'
- aci_bd_subnet:
<<: *tn-ol
bd: *bd
gateway: '{{ item.value.gw }}'
mask: '{{ item.value.msk }}'
args: '{{ aci_vars }}'
with_dict: '{{ oitem.value }}'
- aci_epg:
<<: *tn-ol
ap: &ap
'{{ prefs.ap }}{{ oitem.key }}'
bd: *bd
epg: &epg
'{{ prefs.epg }}{{ item.key }}'
args: '{{ aci_vars }}'
with_dict: '{{ oitem.value }}'
- aci_epg_to_domain:
<<: *tn-ol
ap: *ap
epg: *epg
domain: '{{ dom[ item.key ].dom }}'
domain_type: '{{ dom[ item.key ].dom_type | default("phys") }}'
encap: '{{ dom[ item.key ].encap | default(1) }}'
args: '{{ aci_vars }}'
with_dict: '{{ oitem.value }}'
when: intent == 'present'
- aci_static_binding_to_epg:
<<: *tn-ol
ap: *ap
epg: *epg
pod_id: '{{ phy[ item.key ].pod }}'
leafs: '{{ phy[ item.key ].lf }}'
interface: '1/{{ phy[ item.key ].prt }}'
interface_mode: '{{ phy[ item.key ].prt_mode | default("untagged") }}'
encap_id: '{{ dom[ item.key ].encap | default(1) }}'
args: '{{ aci_vars }}'
with_dict: '{{ oitem.value }}'
when: intent == 'present'
#- TBD: create custom contract
- aci_epg_to_contract:
<<: *tn-ol
ap: *ap
epg: *epg
contract: default # TBD: custom
contract_type: '{{ item.value.role }}'
args: '{{ aci_vars }}'
with_dict: '{{ oitem.value }}'
when: intent == 'present'