Remove references to unsupported operating systems

All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: I7c7d2dc350b34c0b54d2c92b366d43c210a46796
This commit is contained in:
Jonathan Rosser 2021-03-16 09:01:13 +00:00
parent 13dfe075b1
commit a47fa00d40
5 changed files with 8 additions and 27 deletions

View File

@ -5,15 +5,16 @@ galaxy_info:
license: Apache2
min_ansible_version: 2.8
platforms:
- name: Debian
versions:
- buster
- name: Ubuntu
versions:
- bionic
- focal
- name: EL
versions:
- 7
- name: opensuse
versions:
- 15
- 8
galaxy_tags:
- cloud
- uwsgi

View File

@ -33,7 +33,7 @@
package:
name: "{{ uwsgi_package_list }}"
state: "{{ uwsgi_package_state }}"
update_cache: "{{ (ansible_facts['pkg_mgr'] in ['apt', 'zypper']) | ternary('yes', omit) }}"
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_facts['distribution'] | lower == 'debian') | ternary(cache_timeout, omit) }}"
register: install_packages
until: install_packages is success

View File

@ -5,7 +5,7 @@ gid = {{ item.value.uwsgi_guid | default(uwsgi_system_group_name) }}
{% if 'wsgi_venv' in item.value and item.value.wsgi_venv %}
virtualenv = {{ item.value.wsgi_venv }}
{% endif %}
{% if uwsgi_install_method == 'distro' and (ansible_facts['os_family'] | lower) in ['debian', 'suse' ] %}
{% if uwsgi_install_method == 'distro' and (ansible_facts['os_family'] | lower) == 'debian' %}
plugin = python3
{% endif %}
{% if 'wsgi_path' in item.value %}

View File

@ -17,4 +17,4 @@ uwsgi_bin: '/usr/sbin'
uwsgi_distro_packages:
- uwsgi
- "{{ ansible_facts['distribution_major_version'] is version('8', '<') | ternary('uwsgi-plugin-python', 'uwsgi-plugin-python3') }}"
- uwsgi-plugin-python3

View File

@ -1,20 +0,0 @@
---
# Copyright 2019, VEXXHOST, Inc.
#
# 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.
uwsgi_bin: '/usr/sbin'
uwsgi_distro_packages:
- uwsgi
- uwsgi-python3