From dad68278917cda08c29d1ac04683c7acb715d959 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 11 Jul 2017 12:54:08 +0100 Subject: [PATCH] Add support for the openSUSE Leap distributions Add support for the openSUSE Leap distributions. Nothing special is required for this except for adding the appropriate distro variables file and also update the zypper cache before package installation. Change-Id: I0e6461262ddc40aae7dcc1d5595f00dc802d94c2 --- meta/main.yml | 8 ++++++ tasks/neutron_install.yml | 2 +- tasks/neutron_post_install.yml | 9 +++++++ vars/suse-42.yml | 47 ++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 vars/suse-42.yml diff --git a/meta/main.yml b/meta/main.yml index 6b5ff21a..418b4a9d 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -23,6 +23,14 @@ galaxy_info: - name: Ubuntu versions: - xenial + - name: EL + versions: + - 7 + - name: opensuse + versions: + - 42.1 + - 42.2 + - 42.3 categories: - cloud - python diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index 81fda2e1..d3616ec0 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -17,7 +17,7 @@ package: name: "{{ neutron_package_list }}" state: "{{ neutron_package_state }}" - update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}" + update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}" - name: Remove known problem packages diff --git a/tasks/neutron_post_install.yml b/tasks/neutron_post_install.yml index fe4f46c5..51996448 100644 --- a/tasks/neutron_post_install.yml +++ b/tasks/neutron_post_install.yml @@ -131,6 +131,15 @@ - neutron_services['neutron-linuxbridge-agent']['group'] in group_names - ansible_pkg_mgr == 'yum' +- name: Ensure the postup/postdown scripts are loaded (SUSE) + lineinfile: + dest: "/etc/sysconfig/network/config" + line: "POST_UP_SCRIPT='wicked:{{ neutron_checksum_script }}'" + when: + - neutron_metadata_checksum_fix | bool + - neutron_services['neutron-linuxbridge-agent']['group'] in group_names + - ansible_pkg_mgr == 'zypper' + - name: Run metadata iptables checksum fix command: "{{ neutron_checksum_script }}" when: diff --git a/vars/suse-42.yml b/vars/suse-42.yml new file mode 100644 index 00000000..5e3a20e1 --- /dev/null +++ b/vars/suse-42.yml @@ -0,0 +1,47 @@ +--- +# Copyright 2016, Rackspace US, Inc. +# Copyright 2017, SUSE LINUX GmbH. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +neutron_checksum_script: /etc/sysconfig/network/scripts/ifup-post-metadata-checksum + +neutron_ovs_distro_packages: + - openvswitch + +neutron_distro_packages: + - conntrack-tools + - dnsmasq + - dnsmasq-utils + - ebtables + - haproxy + - ipset + - iptables + - iputils + - keepalived + - radvd + - which + +neutron_lxb_distro_packages: + - bridge-utils + +neutron_lbaas_distro_packages: + - haproxy + +neutron_vpnaas_distro_packages: + - openswan + +neutron_remove_distro_packages: [] + +neutron_lbaasv2_initscript_path: "/etc/init/neutron-lbaasv2-agent.conf" +neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent"