aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_newton_xenial/roles/odl_cluster/tasks/03_03_01_recover_external_network_l2.yml
blob: 4efe4339925fda828b72d89b10256e7ac595cd51 (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
27
##############################################################################
# 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