From 8df6d45a578003d3b378bfb486690c770b038916 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 23 Nov 2017 10:25:49 +0000 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: If07ef32f9e39272b4c7fadb438df33f188b186cd --- meta/main.yml | 3 +++ tasks/barbican_install.yml | 2 +- vars/suse.yml | 21 +++++++++++++++++++++ zuul.d/project.yaml | 2 ++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 vars/suse.yml diff --git a/meta/main.yml b/meta/main.yml index 9eeb98f..5102506 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -26,6 +26,9 @@ galaxy_info: - name: EL versions: - 7 + - name: opensuse + versions: + - 42.3 galaxy_tags: - cloud - openstack diff --git a/tasks/barbican_install.yml b/tasks/barbican_install.yml index 2f58cfc..20fc6a2 100644 --- a/tasks/barbican_install.yml +++ b/tasks/barbican_install.yml @@ -17,7 +17,7 @@ package: name: "{{ barbican_distro_packages }}" state: "{{ barbican_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.yml b/vars/suse.yml new file mode 100644 index 0000000..6166a9e --- /dev/null +++ b/vars/suse.yml @@ -0,0 +1,21 @@ +# 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. + +barbican_distro_packages: + - gettext-runtime + - git-core + - libffi-devel + - libopenssl-devel + - postgresql-devel + - python-devel diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index bd57578..896e7cd 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -19,6 +19,7 @@ jobs: - openstack-ansible-linters - openstack-ansible-functional-centos-7 + - openstack-ansible-functional-opensuse-423 - openstack-ansible-functional-ubuntu-xenial experimental: jobs: @@ -27,4 +28,5 @@ jobs: - openstack-ansible-linters - openstack-ansible-functional-centos-7 + - openstack-ansible-functional-opensuse-423 - openstack-ansible-functional-ubuntu-xenial