Add support for the openSUSE Leap distributions

Add support for the openSUSE Leap distributions. Nothing special is
required for this except adding the appropriate distro variables
file and also update the zypper cache before package installation. We
also had to apply the same virtualenv-tools fix similar to CentOS.

Change-Id: I265f57141a1aa0c26857c05e38206b68fd2de1b0
This commit is contained in:
Markos Chandras 2017-08-15 06:16:45 +01:00
parent 28e192744d
commit f023b02b85
3 changed files with 35 additions and 3 deletions

View File

@ -27,6 +27,11 @@ galaxy_info:
- name: EL
versions:
- 7
- name: opensuse
versions:
- 42.1
- 42.2
- 42.3
# Below are all categories currently available. Just as with
# the platforms above, uncomment those that apply to your role.
galaxy_tags:

View File

@ -17,7 +17,7 @@
package:
name: "{{ magnum_distro_packages }}"
state: "{{ magnum_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
@ -100,12 +100,12 @@
when: magnum_get_venv | failed or magnum_get_venv | skipped
notify: Restart magnum services
- name: CentOS remove python from path first
- name: Remove python from path first (CentOS, openSUSE)
file:
path: "{{ magnum_bin | dirname }}/bin/python2.7"
state: "absent"
when:
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'zypper']
- magnum_get_venv | changed
- name: Update virtualenv path

27
vars/suse.yml Normal file
View File

@ -0,0 +1,27 @@
---
# Copyright 2017, Red Hat, 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.
# Common zypper packages
magnum_distro_packages:
- python-devel
- libopenssl-devel
- libxml2-devel
- libxslt-devel
- postgresql-devel
- git-core
- libffi-devel
- gettext
- gcc