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: I59e808ff2dc75e36890d271db0ba7f40f9c108ed
This commit is contained in:
Jonathan Rosser 2021-03-10 12:16:40 +00:00
parent 9c93bfa12a
commit 83694d6750
3 changed files with 6 additions and 55 deletions

View File

@ -22,19 +22,14 @@ galaxy_info:
platforms:
- name: Debian
versions:
- stretch
- buster
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: EL
versions:
- 7
- name: opensuse
versions:
- 42.1
- 42.2
- 42.3
- 8
categories:
- cloud
- python

View File

@ -13,17 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Add zypper repository
zypper_repository:
auto_import_keys: yes
autorefresh: yes
name: "{{ item.name }}"
repo: "{{ item.uri }}"
runrefresh: yes
with_items: "{{ zun_docker_repo }}"
when:
- ansible_pkg_mgr == 'zypper'
- name: Run apt install block
block:
- name: Run the apt package pinning role
@ -101,7 +90,7 @@
delay: 2
with_items: "{{ zun_docker_repo }}"
when:
- ansible_pkg_mgr in ['yum', 'dnf']
- ansible_pkg_mgr == 'dnf'
- name: Enable module_hotfixes
lineinfile:
@ -112,15 +101,14 @@
with_items: "{{ zun_docker_repo }}"
when:
- ansible_os_family | lower == 'redhat'
- ansible_distribution_major_version is version('8', '>=')
- name: Install compute distro packages
package:
name: "{{ zun_distro_compute_packages }}"
state: "{{ zun_package_state }}"
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
enablerepo: "{{ (ansible_pkg_mgr in ['yum', 'dnf']) | ternary('extras', omit) }}"
enablerepo: "{{ (ansible_pkg_mgr == 'dnf') | ternary('extras', omit) }}"
- name: Ensure the containerd config directory exists
file:

View File

@ -1,32 +0,0 @@
---
# Copyright 2018, Rackspace US, 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.
zun_docker_repo:
- name: "OBS:Virtualization:containers"
uri: "http://download.opensuse.org/repositories/Virtualization:/containers/openSUSE_Leap_{{ ansible_distribution_version }}/"
# Common zypp packages
zun_distro_packages:
- device-mapper-persistent-data
- git
- yum-utils
- lvm2
- systemd-devel
zun_distro_compute_packages:
- docker-ce
- pciutils
zun_docker_groupname: dockerroot