Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. On openSUSE we also need to provide our own rabbitmq-server.service systemd file which doesn't depend on epmd.socket and epmd.service unit files. Change-Id: I7907da612654d6593cfa40470eaec0be633ba4e9
This commit is contained in:
parent
22fb8e99e2
commit
ec2ec4c8dc
@ -26,6 +26,11 @@ galaxy_info:
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
- name: opensuse
|
||||
versions:
|
||||
- 42.1
|
||||
- 42.2
|
||||
- 42.3
|
||||
categories:
|
||||
- cloud
|
||||
- rabbitmq
|
||||
|
41
tasks/install_zypper.yml
Normal file
41
tasks/install_zypper.yml
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
- name: Install the RabbitMQ package
|
||||
zypper:
|
||||
name: "{{ rabbitmq_distro_packages }}"
|
||||
register: install_rabbitmq
|
||||
tags:
|
||||
- rabbitmq-package-rpm
|
||||
- rabbitmq-zypper-packages
|
||||
|
||||
# NOTE(hwoarang) on openSUSE, rabbitmq-server depends on epmd.service which
|
||||
# depends on epmd.socket which runs on localhost. It is just easier to let
|
||||
# the rabbitmq-server launch epmd directly since we are inside a container.
|
||||
- name: Add rabbitmq-server systemd service(SUSE)
|
||||
template:
|
||||
src: "rabbitmq-server.service.j2"
|
||||
dest: "/etc/systemd/system/rabbitmq-server.service"
|
||||
register: rabbitmq_server_service_added
|
||||
when: rabbitmq_install_method == 'distro'
|
||||
tags:
|
||||
- rabbitmq-config
|
||||
|
||||
- name: Reload the systemd daemon
|
||||
command: "systemctl daemon-reload"
|
||||
when:
|
||||
- rabbitmq_server_service_added | changed
|
||||
tags:
|
||||
- rabbitmq-config
|
@ -29,6 +29,7 @@
|
||||
tags:
|
||||
- rabbitmq-apt-packages
|
||||
- rabbitmq-yum-packages
|
||||
- rabbimtq-zypper-packages
|
||||
- rabbitmq_server-install
|
||||
|
||||
- name: Ensure there are no policy-rc files
|
||||
|
@ -39,10 +39,11 @@
|
||||
register: installed_rabbitmq_rpm
|
||||
when:
|
||||
- not rabbitmq_upgrade | bool
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
- ansible_pkg_mgr in [ 'yum', 'zypper']
|
||||
tags:
|
||||
- rabbitmq-package-rpm
|
||||
- rabbitmq-yum-packages
|
||||
- rabbitmq-zypper-packages
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Register a fact for the installed RabbitMQ version
|
||||
|
18
templates/rabbitmq-server.service.j2
Normal file
18
templates/rabbitmq-server.service.j2
Normal file
@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=RabbitMQ broker
|
||||
After=syslog.target network.target
|
||||
Conflicts=epmd.socket
|
||||
Conflicts=epmd.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=rabbitmq
|
||||
Group=rabbitmq
|
||||
LimitNOFILE=65535
|
||||
NotifyAccess=all
|
||||
WorkingDirectory=/var/lib/rabbitmq
|
||||
ExecStart=/usr/sbin/rabbitmq-server
|
||||
ExecStop=/usr/sbin/rabbitmqctl stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -14,6 +14,14 @@ rabbitmq_old_package:
|
||||
rabbitmq_package_url: "http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm"
|
||||
rabbitmq_package_sha256: "978ad1cec04c423027f1e42a083a4b437e57f48f3135622b7626118afc0b1fe5"
|
||||
rabbitmq_release_version: "3.6.6"
|
||||
# NOTE(hwoarang): On SUSE, we use 'rabbitmq_install_method = distro' since we
|
||||
# always grab the package from the openSUSE repositories. As such, the
|
||||
# following variables are never used but we keep them here just in case we
|
||||
# change the installation method in the future.
|
||||
suse:
|
||||
rabbitmq_package_url: "http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.suse.noarch.rpm"
|
||||
rabbitmq_package_sha256: "f971f4731e31587351856c6baead3c38dd645df0f944f99e4c3518b9e7586348"
|
||||
rabbitmq_release_version: "3.6.6"
|
||||
|
||||
# NOTE(hwoarang): This normally matches the _rabbitmq_release_version variable
|
||||
# in the vars/* distro files.
|
||||
@ -22,3 +30,6 @@ rabbitmq_new_package:
|
||||
rabbitmq_release_version: "3.6.9"
|
||||
redhat:
|
||||
rabbitmq_release_version: "3.6.9"
|
||||
# NOTE(hwoarang): 3.6.6 is shipped in the Ocata OBS repository
|
||||
suse:
|
||||
rabbitmq_release_version: "3.6.6"
|
||||
|
31
vars/suse.yml
Normal file
31
vars/suse.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
# Even though we install the rabbitmq-server from the openSUSE repositories
|
||||
# (the Ocata OBS project) we still add these here in case we use them in the
|
||||
# future.
|
||||
_rabbitmq_package_url: "http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-3.6.9-1.suse.noarch.rpm"
|
||||
_rabbitmq_package_version: "{{ rabbitmq_package_url.split('/')[-1].rsplit('.', 1)[0] }}"
|
||||
_rabbitmq_release_version: "{{ rabbitmq_package_version.split('-')[2] }}"
|
||||
_rabbitmq_package_sha256: "c44813ab94463f83e3e74be04db7304120697a27df12ca057e3dbb32717af32f"
|
||||
_rabbitmq_package_path: "/opt/rabbitmq-server.rpm"
|
||||
|
||||
rabbitmq_distro_packages:
|
||||
- rabbitmq-server
|
||||
- rabbitmq-server-plugins
|
||||
|
||||
# NOTE(hwoarang) we always grab the package from the distribution repository
|
||||
# which has been configured in the openstack-ansible-pip_install role
|
||||
rabbitmq_install_method: distro
|
Loading…
x
Reference in New Issue
Block a user