diff --git a/defaults/main.yml b/defaults/main.yml index 6db40bcd..801d062b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -61,7 +61,9 @@ swift_system_home_folder: "/var/lib/{{ swift_system_user_name }}" ## Swift Syslog User / Group 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" ## Auth token diff --git a/meta/main.yml b/meta/main.yml index 1868b364..4fcaa074 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -23,9 +23,14 @@ galaxy_info: - name: Ubuntu versions: - xenial - - name: CentOS + - name: EL versions: - 7 + - name: opensuse + versions: + - 42.1 + - 42.2 + - 42.3 categories: - cloud - python diff --git a/tasks/swift_install.yml b/tasks/swift_install.yml index 40f84793..8f962620 100644 --- a/tasks/swift_install.yml +++ b/tasks/swift_install.yml @@ -17,7 +17,7 @@ package: name: "{{ item }}" 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) }}" 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..201fa9ce --- /dev/null +++ b/vars/suse-42.yml @@ -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