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.
Moreover, the syslog user belongs to the 'users' group instead of a
dedicated 'syslog' group so we adjust the defaults for openSUSE.

Depends-On: I96c02fb2ee26691f1d7dd449d7205baa231795fe
Change-Id: I86beac2b3e038a0a4a3bf9618218bc1e393bdf08
This commit is contained in:
Markos Chandras 2017-07-11 18:25:04 +01:00
parent 01c3728efc
commit 5a3ee5489b
4 changed files with 42 additions and 3 deletions

View File

@ -61,7 +61,9 @@ swift_system_home_folder: "/var/lib/{{ swift_system_user_name }}"
## Swift Syslog User / Group ## Swift Syslog User / Group
swift_syslog_user_name: syslog swift_syslog_user_name: syslog
swift_syslog_group_name: syslog # NOTE(hwoarang) The syslog user on openSUSE belongs to the 'users'
# group. There is no dedicated syslog group.
swift_syslog_group_name: "{{ (ansible_pkg_mgr == 'zypper') | ternary ('users', 'syslog') }}"
swift_syslog_log_perms: "0644" swift_syslog_log_perms: "0644"
## Auth token ## Auth token

View File

@ -23,9 +23,14 @@ galaxy_info:
- name: Ubuntu - name: Ubuntu
versions: versions:
- xenial - xenial
- name: CentOS - name: EL
versions: versions:
- 7 - 7
- name: opensuse
versions:
- 42.1
- 42.2
- 42.3
categories: categories:
- cloud - cloud
- python - python

View File

@ -17,7 +17,7 @@
package: package:
name: "{{ item }}" name: "{{ item }}"
state: "{{ swift_package_state }}" state: "{{ swift_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) }}" cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
register: install_packages register: install_packages
until: install_packages|success until: install_packages|success

32
vars/suse-42.yml Normal file
View File

@ -0,0 +1,32 @@
---
# 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.
swift_distro_packages:
- curl
- gcc
- git-core
- liberasurecode1
- liberasurecode-devel
- libffi-devel
- openssh
- python-devel
- rsync
- libopenssl-devel
- cronie
- cronie-anacron
- which
swift_rsync_service_name: rsyncd