-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtn.yml
33 lines (33 loc) · 986 Bytes
/
tn.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
---
- hosts: apic
vars:
vrf: '{{ prefs.vrf }}{{ tn }}'
tasks:
- aci_tenant: &tn
tenant: '{{ tnn }}'
state: '{{ intent }}'
output_level: '{{ output_level }}'
args: '{{ aci_vars }}'
ignore_errors: '{{ intent == "absent" }}'
- meta: end_play
when: intent == "absent"
- aci_ap:
<<: *tn
ap: '{{ prefs.ap }}{{ item.key }}'
args: '{{ aci_vars }}'
with_dict: '{{ aps }}'
- aci_vrf:
<<: *tn
vrf: '{{ vrf }}'
args: '{{ aci_vars }}'
- include_tasks: epg.yml
vars:
phy: '{ {% for i in oitem.value -%}
"{{ i }}": {{ phys[ oitem.value[ i ].phy ] }}{%- if not loop.last -%}, {% endif -%}
{%- endfor %} }'
dom: '{ {% for i in oitem.value -%}
"{{ i }}": {{ doms[ oitem.value[ i ].dom ] }}{%- if not loop.last -%}, {% endif -%}
{%- endfor %} }'
with_dict: '{{ aps }}'
loop_control:
loop_var: oitem