04f0ec617dd471aafd6c2d9ff9459a7235a2368e
[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: restart keepalived to recover external IP before check br-int
12   shell: service keepalived restart
13   when: inventory_hostname in groups['odl']
14   ignore_errors: True
15
16 - name: restart opendaylight (for newton, opendaylight doesn't listen 6640 port, need restart)
17   shell: service opendaylight restart; sleep 60
18   when: inventory_hostname in groups['odl']
19   ignore_errors: True
20
21 - name: set opendaylight as the manager
22   command: su -s /bin/sh -c "ovs-vsctl set-manager tcp:{{ internal_vip.ip }}:6640;"
23
24 - name: check br-int
25   shell: ovs-vsctl list-br | grep br-int; while [ $? -ne 0 ]; do sleep 10; ovs-vsctl list-br | grep br-int; done
26
27 - name: set local ip in openvswitch
28   shell: ovs-vsctl set Open_vSwitch $(ovs-vsctl show | head -n 1) other_config={'local_ip'=' {{ internal_ip }} '};
29
30 #'