forked from ksator/EVPN_DCI_automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpb.renderaddvlans.yml
38 lines (34 loc) · 1.07 KB
/
pb.renderaddvlans.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
- name: create render directory
hosts: localhost
gather_facts: no
tasks:
- name: create render directory
file:
path: "{{playbook_dir}}/render"
state: directory
- name: render template for QFX10k
hosts: QFX10k
connection: local
gather_facts: no
tasks:
- name: remove files from render directory
file:
path: "{{playbook_dir}}/render/{{inventory_hostname}}_addvlans.conf"
state: absent
- name: Render template for QFX10k
template:
src: "{{playbook_dir}}/templates/10kaddvlans.j2"
dest: "{{playbook_dir}}/render/{{ inventory_hostname }}_addvlans.conf"
- name: render template for QFX5k
hosts: QFX5k
connection: local
gather_facts: no
tasks:
- name: remove files from render directory
file:
path: "{{playbook_dir}}/render/{{inventory_hostname}}_addvlans.conf"
state: absent
- name: Render template for QFX5k
template:
src: "{{playbook_dir}}/templates/5kaddvlans.j2"
dest: "{{playbook_dir}}/render/{{ inventory_hostname }}_addvlans.conf"