Add support for openSUSE

This patch aims to ensure that this role is functional in opensuse-42x.

Change-Id: Icdf2787ba6de2f7d870973e1ce6bee16b8074575
This commit is contained in:
kaiokassiano 2018-08-03 04:36:05 -03:00
parent d4a502d209
commit c3c36bcadc
4 changed files with 25 additions and 9 deletions

View File

@ -25,6 +25,11 @@ galaxy_info:
versions:
- bionic
- xenial
- name: opensuse
versions:
- 42.1
- 42.2
- 42.3
categories:
- cloud
- python

View File

@ -15,7 +15,7 @@
package:
name: "{{ monasca_agent_distro_packages }}"
state: "{{ monasca_agent_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 is success
@ -99,12 +99,12 @@
notify:
- Restart monasca-agent services
- name: CentOS remove python from path first
- name: Remove python from path first (CentOS, openSUSE)
file:
path: "{{ monasca_agent_bin | dirname }}/bin/python2.7"
state: "absent"
when:
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'zypper']
- monasca_agent_get_venv is changed
# NOTE(odyssey4me):

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

@ -0,0 +1,17 @@
---
# 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.
monasca_agent_distro_packages:
- git
- pkg-config
- libvirt-devel

View File

@ -23,9 +23,6 @@
# TODO(jrosser) Revert this once opensuse-150 passes
- openstack-ansible-functional-opensuse-150:
voting: false
# TODO(jrosser) Revert this once opensuse-423 passes
- openstack-ansible-functional-opensuse-423:
voting: false
gate:
jobs:
# TODO(jrosser) Revert this once centos-7 passes
@ -34,6 +31,3 @@
# TODO(jrosser) Revert this once opensuse-150 passes
- openstack-ansible-functional-opensuse-150:
voting: false
# TODO(jrosser) Revert this once opensuse-423 passes
- openstack-ansible-functional-opensuse-423:
voting: false