Add openSUSE Leap support

Add support for the openSUSE Leap distribution

Change-Id: I70b4d118f44c2090e48955effab44189866fbb41
This commit is contained in:
Markos Chandras 2017-03-22 13:41:30 +00:00
parent 8f8543f81a
commit d1b52f012c
6 changed files with 80 additions and 0 deletions

View File

@ -26,6 +26,11 @@ galaxy_info:
- name: EL
versions:
- 7
- name: opensuse
versions:
- 42.1
- 42.2
- 42.3
categories:
- cloud
- python

View File

@ -23,6 +23,11 @@
tags:
- install-yum
- include: haproxy_install_zypper.yml
when: ansible_pkg_mgr == 'zypper'
tags:
- install-zypper
- include: haproxy_install_hatop.yml
- name: Create haproxy conf.d dir

View File

@ -0,0 +1,26 @@
---
# 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 zypper packages
zypper:
name: "{{ item }}"
state: "{{ haproxy_package_state }}"
register: install_packages
until: install_packages|success
retries: 5
delay: 2
with_items: "{{ haproxy_distro_packages }}"
tags:
- haproxy-zypper-packages

View File

@ -67,3 +67,10 @@
tags:
- haproxy-dirs
- haproxy-logs
- name: Remove conflicting distro packages
package:
name: "{{ item }}"
state: absent
with_items:
- "{{ haproxy_distro_packages_remove }}"

16
vars/main.yml Normal file
View File

@ -0,0 +1,16 @@
---
# 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.
haproxy_distro_packages_remove: []

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

@ -0,0 +1,21 @@
---
# 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.
haproxy_distro_packages:
- haproxy
- rsyslog # Used for local logging
haproxy_distro_packages_remove:
- systemd-logger # conflicts with rsyslog