2c5332f9378e4af0a820db64c90297458849b642
[compass4nfv.git] /
1 ##############################################################################
2 # Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 ---
10
11 - name: set opendaylight as the manager
12   command: su -s /bin/sh -c "ovs-vsctl set-manager tcp:{{ internal_vip.ip }}:6640;"
13
14 - name: restart keepalived to recover external IP before check br-int
15   shell: service keepalived restart
16   when: inventory_hostname in groups['odl']
17   ignore_errors: True
18
19 - name: check br-int
20   shell: ovs-vsctl list-br | grep br-int; while [ $? -ne 0 ]; do sleep 10; ovs-vsctl list-br | grep br-int; done
21
22 - name: set local ip in openvswitch
23   shell: ovs-vsctl set Open_vSwitch $(ovs-vsctl show | head -n 1) other_config={'local_ip'=' {{ internal_ip }} '};
24
25 #'