From 13ac3d38ee698f5137dc9e4c18bf067f69af27e1 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 10 Mar 2021 12:16:37 +0000 Subject: [PATCH] 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: I796d9de164a8b79eff8a615442dd46e7de2353e7 --- defaults/main.yml | 1 - meta/main.yml | 9 ++---- tasks/cinder_install.yml | 2 +- tasks/main.yml | 2 +- vars/redhat.yml | 4 +-- vars/suse.yml | 69 ---------------------------------------- 6 files changed, 7 insertions(+), 80 deletions(-) delete mode 100644 vars/suse.yml diff --git a/defaults/main.yml b/defaults/main.yml index af806b08..ae2ee963 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -211,7 +211,6 @@ cinder_osapi_volume_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_fa cinder_target_helper_mapping: RedHat: lioadm Debian: tgtadm - Suse: tgtadm cinder_target_helper: "{{ cinder_target_helper_mapping[ansible_facts['os_family']] }}" cinder_iscsi_iotype: fileio cinder_iscsi_num_targets: 100 diff --git a/meta/main.yml b/meta/main.yml index 275db911..88d8b85b 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -22,17 +22,14 @@ galaxy_info: platforms: - name: Debian versions: - - stretch + - buster - name: Ubuntu versions: - - xenial - bionic + - focal - name: EL versions: - - 7 - - name: opensuse - versions: - - 15 + - 8 categories: - cloud - python diff --git a/tasks/cinder_install.yml b/tasks/cinder_install.yml index 93254426..4b14d17d 100644 --- a/tasks/cinder_install.yml +++ b/tasks/cinder_install.yml @@ -29,7 +29,7 @@ package: name: "{{ cinder_package_list }}" state: "{{ cinder_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['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}" register: install_packages until: install_packages is success diff --git a/tasks/main.yml b/tasks/main.yml index 431d6e19..93fde94c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -182,7 +182,7 @@ package: name: "{{ cinder_volume_distro_packages_tools }}" state: "{{ cinder_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['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}" register: install_packages until: install_packages is success diff --git a/vars/redhat.yml b/vars/redhat.yml index 5f59aee0..b5f9cb50 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -26,7 +26,7 @@ cinder_distro_packages: cinder_service_distro_packages: - openstack-cinder - - "{{ ansible_facts['distribution_major_version'] is version('8', '<') | ternary('systemd-python', 'python3-systemd') }}" + - python3-systemd cinder_devel_distro_packages: - git @@ -41,7 +41,7 @@ cinder_api_distro_packages: [] cinder_volume_service_distro_packages: [] cinder_volume_distro_packages_tools: - - "qemu-img{% if ansible_facts['distribution_major_version']|int <= 7 %}-ev{% endif %}" + - qemu-img cinder_volume_distro_packages: - iscsi-initiator-utils diff --git a/vars/suse.yml b/vars/suse.yml deleted file mode 100644 index 6cc78da3..00000000 --- a/vars/suse.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -# Copyright 2016, 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. - -# service names -tgt_service_name: tgtd - -# Common yum packages -cinder_distro_packages: - - libkmod2 - - libxslt1 - -cinder_service_distro_packages: - - openstack-cinder-scheduler - - python3-openstackclient - - python3-shade - -cinder_api_distro_packages: - - openstack-cinder-api - -cinder_devel_distro_packages: - - git-core - - libxslt-devel - - libkmod-devel - - postgresql-devel - - systemd-devel - - zlib-devel - -cinder_volume_service_distro_packages: - - openstack-cinder-volume - -cinder_volume_distro_packages_tools: - - qemu-tools - -cinder_volume_distro_packages: - - open-iscsi - - nfs-utils - - rpcbind - -cinder_lvm_volume_distro_packages: - - device-mapper - - lvm2 - - parted - - tgt - -cinder_backup_service_distro_packages: - - openstack-cinder-backup - -cinder_backup_distro_packages: - - open-iscsi - - nfs-utils - - rpcbind - -cinder_oslomsg_amqp1_distro_packages: - - cyrus-sasl - - cyrus-sasl-plain - - cyrus-sasl-digestmd5