7eddf7fa7a95d2685fe7b378b4b9c70826ca0c72
[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: combine odl controller
12   shell: rm -f /opt/cluster; touch /opt/cluster;
13
14 - name: combine odl controller
15   shell: echo "{{ ip_settings[item.1]['mgmt']['ip'] }} \c" >> /opt/cluster; >> /opt/cluster;
16   with_indexed_items: groups['odl']
17
18 - name: combine odl controller
19   shell: cat /opt/cluster
20   register: cluster
21
22 #- debug: msg="{{ cluster.stdout_lines[0] }}"
23
24 - name: combine odl controller
25   shell: uname -n | cut -b 5,5
26   register: number
27
28 #- debug: msg="{{ number.stdout_lines[0] }}"
29
30 - debug: msg="{{ odl_home }}/bin/configure_cluster.sh {{ number.stdout_lines[0] }} {{ cluster.stdout_lines[0] }}"
31
32 - name: configure odl controller in cluster
33   shell: "{{ odl_home }}/bin/configure_cluster.sh {{ number.stdout_lines[0] }} {{ cluster.stdout_lines[0] }}"
34