1 ##############################################################################
2 # Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
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 ##############################################################################
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"
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"
21 - name: copy recovery script
22 copy: src={{ item }} dest=/opt/setup_networks
26 - name: recover external script
27 shell: python /opt/setup_networks/recover_network.py