forked from CiscoDevNet/sdwan-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport-templates.yml
29 lines (28 loc) · 889 Bytes
/
import-templates.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
- name: Import vManage Policy Lists
hosts: localhost
gather_facts: no
connection: local
roles:
- ansible-viptela
vars:
vmanage_host: "{{ groups.vmanage_hosts | first }}"
vmanage_ip: "{{ hostvars[vmanage_host].ansible_host }}"
tags:
- templates
tasks:
- name: Import feature templates
vmanage_feature_template:
user: "{{ ansible_user }}"
host: "{{ vmanage_ip }}"
password: "{{ ansible_password }}"
state: present
aggregate: "{{ vmanage_feature_templates }}"
when: vmanage_feature_templates is defined
- name: Import device templates
vmanage_device_template:
user: "{{ ansible_user }}"
host: "{{ vmanage_ip }}"
password: "{{ ansible_password }}"
state: present
aggregate: "{{ vmanage_device_templates }}"
when: vmanage_device_templates is defined