1 ##############################################################################
2 # Copyright (c) 2017 Mirantis Inc. and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- from "opendaylight/map.jinja" import client with context %}
9 {%- if client.get('enabled', True) %}
11 opendaylight_client_packages:
13 - pkgs: {{ client.pkgs }}
15 {%- if pillar.linux.network.bridge is defined and pillar.linux.network.bridge == 'openvswitch' %}
18 - name: "ovs-vsctl set-manager {{ client.ovsdb_server_iface }} {{ client.ovsdb_odl_iface }}"
19 - unless: "ovs-vsctl get-manager | grep -Fx {{ client.ovsdb_odl_iface }}"
21 ovs_set_tunnel_endpoint:
23 - name: "ovs-vsctl set Open_vSwitch . other_config:local_ip={{ client.tunnel_ip }}"
24 - unless: "ovs-vsctl get Open_vSwitch . other_config | fgrep local_ip"
26 - cmd: ovs_set_manager
28 {%- if client.provider_mappings is defined %}
29 ovs_set_provider_mapping:
31 - name: "ovs-vsctl set Open_vSwitch . other_config:provider_mappings={{ client.provider_mappings }}"
32 - unless: "ovs-vsctl get Open_vSwitch . other_config | fgrep provider_mappings"
34 - cmd: ovs_set_manager