Add OVS-NSH support for opensuse

Based on https://review.openstack.org/#/c/517259/, this patch provides support
for opensuse too

Change-Id: I6e2f0918c8a9b3b77cf7691ddeff875c3eaa3c56
This commit is contained in:
Manuel Buil 2017-12-01 15:43:10 +01:00 committed by Jean-Philippe Evrard
parent db404dc4c8
commit 0dd3c1d816
3 changed files with 29 additions and 1 deletions

View File

@ -79,3 +79,21 @@
mode: "0440" mode: "0440"
owner: "root" owner: "root"
group: "root" group: "root"
- name: Add zypper repo for ovs-nsh package
zypper_repository:
repo: "{{ repo.repo }}"
state: "{{ repo.state | default('present') }}"
name: "{{ repo.name | default(omit) }}"
enabled: "{{ repo.enabled | default(omit) }}"
disable_gpg_check: "{{ repo.disable_gpg_check | default(omit) }}"
description: "{{ repo.description | default(omit) }}"
autorefresh: "{{ repo.autorefresh | default(omit) }}"
auto_import_keys: "{{ repo.auto_import_keys | default(omit) }}"
priority: "{{ repo.priority | default(omit) }}"
with_items: "{{ neutron_repos }}"
loop_control:
loop_var: repo
when:
- ansible_pkg_mgr == 'zypper'
- ovs_nsh_support | bool

View File

@ -28,7 +28,7 @@ neutron_package_list: |-
or (neutron_services['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool) or (neutron_services['dragonflow-controller-agent']['group'] in group_names and neutron_services['dragonflow-controller-agent'].service_en | bool)
or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool) or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool)
or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight') %} or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight') %}
{% if (ovs_nsh_support and ansible_distribution == 'Ubuntu') %} {% if (ovs_nsh_support and ansible_pkg_mgr in ['apt', 'zypper']) %}
{% set _ = packages.extend(neutron_ovs_nsh_required_packages) %} {% set _ = packages.extend(neutron_ovs_nsh_required_packages) %}
{% else %} {% else %}
{% set _ = packages.extend(neutron_ovs_distro_packages) %} {% set _ = packages.extend(neutron_ovs_distro_packages) %}

View File

@ -21,6 +21,16 @@ neutron_ovs_distro_packages:
neutron_ovs_service_name: openvswitch neutron_ovs_service_name: openvswitch
neutron_ovs_nsh_required_packages:
- openvswitch-switch
neutron_repos:
- repo: https://download.opensuse.org/repositories/home:/mosquetero/openSUSE_Leap_{{ ansible_distribution_version }}/
name: ovs-nsh
autorefresh: yes
auto_import_keys: yes
priority: 98
neutron_distro_packages: neutron_distro_packages:
- conntrack-tools - conntrack-tools
- dnsmasq - dnsmasq