aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/odl_cluster/tasks/03_03_01_recover_external_network_l2.yml
blob: ad204cf97210b5bfb57ba007af03546572c0dcaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
##############################################################################
# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
- name: add ovs bridge
  openvswitch_bridge: bridge={{ item["name"] }} state=present
  with_items: "{{ network_cfg['provider_net_mappings'] }}"
  when: item["type"] == "ovs"

- name: add ovs uplink
  openvswitch_port: bridge={{ item["name"] }} port={{ item["interface"] }} state=present
  with_items: "{{ network_cfg['provider_net_mappings'] }}"
  when: item["type"] == "ovs"

- name: copy recovery script
  copy:  src={{ item }} dest=/opt/setup_networks
  with_items:
    - recover_network.py

- name: recover external script
  shell: python /opt/setup_networks/recover_network.py