Add support for the openSUSE Leap distributions

Add support for the openSUSE Leap distributions. Similar to CentOS,
we need to modify the libvirt sysconfig file to enable/disable the
TCP/IP listening option. Moreover, we also update the  zypper cache
before package installation.

Change-Id: I7b2a39eb38b5bee08c90f5188c53e0e5cf3d7e2e
This commit is contained in:
Markos Chandras 2017-07-25 18:50:59 +01:00
parent 6ce3958ed4
commit 394365f0af
5 changed files with 83 additions and 8 deletions

View File

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

View File

@ -83,7 +83,7 @@
- nova-kvm
- nova-libvirt
- name: Set libvirt runtime options (CentOS)
- name: Set libvirt runtime options (RPM)
lineinfile:
dest: "/etc/sysconfig/libvirtd"
line: 'LIBVIRTD_ARGS="-l"'
@ -91,14 +91,14 @@
backup: "yes"
when:
- nova_libvirtd_listen_tcp == 1
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'zypper']
notify: Restart libvirt-bin
tags:
- nova-config
- nova-kvm
- nova-libvirt
- name: Set libvirt runtime options (CentOS)
- name: Set libvirt runtime options (RPM)
lineinfile:
dest: "/etc/sysconfig/libvirtd"
line: 'LIBVIRTD_ARGS=""'
@ -106,7 +106,7 @@
backup: "yes"
when:
- nova_libvirtd_listen_tcp == 0
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'zypper']
notify: Restart libvirt-bin
tags:
- nova-config

View File

@ -24,7 +24,7 @@
package:
name: "{{ nova_package_list }}"
state: "{{ nova_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) }}"
- name: Remove known problem packages for the Spice console

View File

@ -34,18 +34,18 @@
when:
- inventory_hostname in groups['nova_all']
- ansible_pkg_mgr == 'apt'
- name: Install packages required to build nova python package (CentOS)
- name: Install packages required to build nova python package (RPM)
yum:
name: "{{ item }}"
with_items:
- libxml2-devel
- libxslt-devel
- libffi-devel
- pkgconfig
- "{{ (ansible_pkg_mgr == 'yum') | ternary('pkgconfig', 'pkg-config') }}"
- libvirt-devel
when:
- inventory_hostname in groups['nova_all']
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'zypper']
- include: common/ensure-rabbitmq.yml
vhost_name: "{{ nova_rabbitmq_vhost }}"
user_name: "{{ nova_rabbitmq_userid }}"

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

@ -0,0 +1,67 @@
---
# Copyright 2014, 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.
nova_qemu_user: qemu
nova_qemu_group: qemu
libvirt_group: libvirt
libvirt_service_name: libvirtd
# Common yum packages
nova_distro_packages:
- genisoimage
- git-core
- iptables
- postgresql-devel
- which
# Spice console zypper packages
nova_spice_distro_packages:
- libspice-controller0
nova_novnc_distro_packages:
- python-websockify
nova_compute_kvm_distro_packages:
- bridge-utils
- "{% if nova_barbican_enabled | bool %}cryptsetup{% endif %}"
- device-mapper
- dosfstools
- genisoimage
- open-iscsi
- kpartx
- libvirt-daemon-config-nwfilter
- libvirt-daemon-driver-qemu
- qemu-kvm
- libvirt-devel
- libvirt-python
- nfs-utils
- python-libguestfs
- qemu-tools
- sysfsutils
# TODO: add support for LXD on openSUSE at some point.
nova_compute_lxd_distro_packages: []
# TODO: add support for PowerVM/NovaLink on openSUSE at some point.
nova_compute_powervm_distro_packages: []
novalink_gpg_keys: []
nova_nginx_distro_packages:
- nginx
nova_nginx_conf_path: "conf.d"
nova_nginx_user_name: "nginx"