From d6e92768bb383663c9ef69a79f96288b58f9ccda Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 6 Jul 2017 10:55:03 +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: Ie7a62cf249deb521cb8538e19dda2ab7170b2b9b --- meta/main.yml | 5 +++++ tasks/cinder_install.yml | 2 +- vars/suse-42.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 vars/suse-42.yml diff --git a/meta/main.yml b/meta/main.yml index d815fc16..e6cc3bcc 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -26,6 +26,11 @@ galaxy_info: - name: EL versions: - 7 + - name: opensuse + versions: + - 42.1 + - 42.2 + - 42.3 categories: - cloud - python diff --git a/tasks/cinder_install.yml b/tasks/cinder_install.yml index 127c8002..11213708 100644 --- a/tasks/cinder_install.yml +++ b/tasks/cinder_install.yml @@ -17,7 +17,7 @@ package: name: "{{ cinder_package_list }}" state: "{{ cinder_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) }}" register: install_packages until: install_packages | success diff --git a/vars/suse-42.yml b/vars/suse-42.yml new file mode 100644 index 00000000..0862899d --- /dev/null +++ b/vars/suse-42.yml @@ -0,0 +1,42 @@ +--- +# 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. + +# service names +tgt_service_name: tgtd + +# Common yum packages +cinder_distro_packages: + - nfs-utils + - rpcbind + - libxslt-devel + - postgresql-devel + - libkmod-devel + - libkmod2 + - zlib-devel + - which + - open-iscsi + +cinder_developer_mode_distro_packages: + - git-core + +cinder_volume_distro_packages: + - qemu-tools + +cinder_lvm_volume_distro_packages: + - device-mapper + - lvm2 + - parted + - tgt