4efe4339925fda828b72d89b10256e7ac595cd51
[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: add ovs bridge
12   openvswitch_bridge: bridge={{ item["name"] }} state=present
13   with_items: "{{ network_cfg['provider_net_mappings'] }}"
14   when: item["type"] == "ovs"
15
16 - name: add ovs uplink
17   openvswitch_port: bridge={{ item["name"] }} port={{ item["interface"] }} state=present
18   with_items: "{{ network_cfg['provider_net_mappings'] }}"
19   when: item["type"] == "ovs"
20
21 - name: copy recovery script
22   copy:  src={{ item }} dest=/opt/setup_networks
23   with_items:
24     - recover_network.py
25
26 - name: recover external script
27   shell: python /opt/setup_networks/recover_network.py