From e9ae99edbf6e81558663a042f015bde6b4fe2c3e Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 5 Jul 2017 10:07:11 +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: Ia3fe5fedbbc2781cf2e7ae4d82c09e0960c6744b --- meta/main.yml | 5 +++++ tasks/glance_install.yml | 2 +- vars/redhat-7.yml | 1 + vars/suse-42.yml | 24 ++++++++++++++++++++++++ vars/ubuntu-16.04.yml | 1 + 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 vars/suse-42.yml diff --git a/meta/main.yml b/meta/main.yml index b1170e37..92fd40e6 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/glance_install.yml b/tasks/glance_install.yml index 66ef8da6..e3995a82 100644 --- a/tasks/glance_install.yml +++ b/tasks/glance_install.yml @@ -17,7 +17,7 @@ package: name: "{{ glance_distro_packages }}" state: "{{ glance_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/redhat-7.yml b/vars/redhat-7.yml index af278c72..c97584ca 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -1,3 +1,4 @@ +--- # Copyright 2016, Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vars/suse-42.yml b/vars/suse-42.yml new file mode 100644 index 00000000..8c85a090 --- /dev/null +++ b/vars/suse-42.yml @@ -0,0 +1,24 @@ +--- +# Copyright 2016, Intel Corporation. +# 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. + +glance_distro_packages: + - cronie + - cronie-anacron + - rpcbind + - rsync + - git-core + - nfs-utils + - which diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index 96ff60dd..d7528f9d 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -1,3 +1,4 @@ +--- # Copyright 2016, Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License");