-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.yml
77 lines (74 loc) · 2.03 KB
/
build.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
- hosts: encs
connection: local
gather_facts: no
vars:
state: present
roles:
- ansible-nfvis
tags:
- vlan
tasks:
- name: Build VLANs
nfvis_vlan:
host: "{{ ansible_host }}"
user: "{{ ansible_user }}"
password: "{{ ansible_password }}"
state: "{{ state }}"
vlan_id: "{{ item }}"
loop: "{{ nfvis_vlans | default([]) }}"
- hosts: nfvis
connection: local
gather_facts: no
vars:
state: present
roles:
- ansible-nfvis
tags:
- network
tasks:
- name: Build Bridges
nfvis_bridge:
host: "{{ ansible_host }}"
user: "{{ ansible_user }}"
password: "{{ ansible_password }}"
name: "{{ item.key }}"
port: "{{ item.value.port | default(omit) }}"
state: "{{ state }}"
register: results
with_dict: "{{ nfvis_bridges | default({}) }}"
- name: Build Networks
nfvis_network:
host: "{{ ansible_host }}"
user: "{{ ansible_user }}"
password: "{{ ansible_password }}"
name: "{{ item.key }}"
bridge: "{{ item.value.bridge }}"
trunk: "{{ item.value.trunk | default(omit) }}"
vlan: "{{ item.value.vlan | default(omit) }}"
state: "{{ state }}"
register: results
with_dict: "{{ nfvis_networks | default({}) }}"
- hosts: vnf
connection: local
gather_facts: no
vars:
state: present
roles:
- ansible-nfvis
tags:
- vnf
tasks:
- name: Build VNFs
nfvis_deployment:
host: "{{ nfvis.host }}"
user: "{{ nfvis_user }}"
password: "{{ nfvis_password }}"
name: "{{ nfvis.name }}"
state: "{{ state }}"
image: "{{ nfvis.image }}"
flavor: "{{ nfvis.flavor }}"
interfaces: "{{ nfvis.interfaces | default(omit) }}"
kpi_data: "{{ nfvis.kpi_data | default(omit) }}"
bootup_time: "{{ nfvis.bootup_time | default(omit) }}"
port_forwarding: "{{ nfvis.port_forwarding | default(omit) }}"
config_data: "{{ nfvis.config_data | default(omit) }}"