blob: 002509a5fc020af63345319b88dcde5116a2fecf [file] [log] [blame]
alshabib4997cd72016-05-24 22:48:29 -07001- name: Bridge onosbr0 is present
2 become: yes
3 template:
4 src: templates/create_bridge.j2
5 dest: /etc/network/if-pre-up.d/create_bridge_{{ networks.bridge_name }}
6 owner: root
7 group: root
8 mode: 0755
9
10- name: eth1 is in onosbr0
11 become: yes
12 template:
13 src: templates/add_iface.j2
14 dest: /etc/network/if-pre-up.d/add_iface_{{ interfaces.hostonly }}
15 owner: root
16 group: root
17 mode: 0755
18
19- name: Activate onos bridge
20 become: yes
21 command: /etc/network/if-pre-up.d/create_bridge_{{ networks.bridge_name }} report-changed
22 register: bridge_changed
23 changed_when: bridge_changed.stdout == 'true'
24
25- name: Activate eth1 in bridge
26 become: yes
27 command: /etc/network/if-pre-up.d/add_iface_{{ interfaces.hostonly }} report-changed
28 register: bridge_iface_changed
29 changed_when: bridge_iface_changed == 'true'
30
31- name: Flush ip of eth1
32 become: yes
33 command: /sbin/ip addr flush {{ interfaces.hostonly }}
34
35- name: bring onosbr0 up
36 become: yes
37 command: /sbin/ifconfig onosbr0 up