From dfe91c5ac064518d16d4f53bfb59ab527d41b202 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 16 Mar 2021 08:50:44 +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: Ibe914d0d547b930b8167bfa475cc838df8d7ae25 --- meta/main.yml | 11 ++++++----- tasks/repo_install.yml | 6 +++--- vars/suse.yml | 33 --------------------------------- 3 files changed, 9 insertions(+), 41 deletions(-) delete mode 100644 vars/suse.yml diff --git a/meta/main.yml b/meta/main.yml index f80bcc8..2c334ee 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -20,15 +20,16 @@ galaxy_info: license: Apache2 min_ansible_version: 2.2 platforms: + - name: Debian + versions: + - buster - name: Ubuntu versions: - - xenial + - bionic + - focal - name: EL versions: - - 7 - - name: opensuse - versions: - - 15 + - 8 categories: - cloud - python diff --git a/tasks/repo_install.yml b/tasks/repo_install.yml index 36f92af..035181f 100644 --- a/tasks/repo_install.yml +++ b/tasks/repo_install.yml @@ -18,7 +18,7 @@ key: "{{ repo_centos_epel_key }}" state: present when: - - ansible_facts['pkg_mgr'] in ['yum', 'dnf'] + - ansible_facts['pkg_mgr'] == 'dnf' register: _add_yum_keys until: _add_yum_keys is success retries: 5 @@ -34,7 +34,7 @@ state: present includepkgs: 'lsyncd' when: - - ansible_facts['pkg_mgr'] in ['yum', 'dnf'] + - ansible_facts['pkg_mgr'] == 'dnf' register: install_epel_repo until: install_epel_repo is success retries: 5 @@ -47,7 +47,7 @@ baseurl: "{{ repo_centos_nginx_mirror }}" gpgkey: "{{ repo_centos_nginx_key }}" when: - - ansible_facts['pkg_mgr'] in ['yum', 'dnf'] + - ansible_facts['pkg_mgr'] == 'dnf' register: add_nginx_repo until: add_nginx_repo is success retries: 5 diff --git a/vars/suse.yml b/vars/suse.yml deleted file mode 100644 index 8243e3a..0000000 --- a/vars/suse.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Copyright 2016, Walmart Stores, 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. - -systemd_utils_prefix: "/usr/lib/systemd" - -repo_nginx_pid: /var/run/nginx.pid - -rsyncd_service_name: rsyncd - -repo_server_distro_packages: - - lsyncd - - nginx - - openssh - - rsync - - sudo - -repo_lsyncd_config_file: /etc/lsyncd/lsyncd.conf -repo_lsyncd_defaults_file: /etc/sysconfig/lsyncd - -repo_server_sshd: sshd