From f2093a18edf13aee0812e6c784f9450055ad3644 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 16 Mar 2021 08:30:29 +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: I8224deceba331d9fbca64c151b27430530a18528 --- meta/main.yml | 9 +++------ tests/test.yml | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 959ab3e..49cac16 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/tests/test.yml b/tests/test.yml index 1685774..eb8f2be 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -39,7 +39,7 @@ key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7" 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 @@ -48,14 +48,14 @@ - name: Install the EPEL repository yum_repository: name: epel-nginx - baseurl: "{{ (centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_facts['distribution_major_version'] ~ ((ansible_facts['distribution_major_version'] is version('8', '<')) | ternary('/', '/Everything/')) ~ ansible_facts['architecture'] }}" + baseurl: "{{ (centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_facts['distribution_major_version'] ~ '/Everything/' ~ ansible_facts['architecture'] }}" description: 'Extra Packages for Enterprise Linux - $basearch' gpgcheck: yes enabled: yes state: present includepkgs: 'nginx*' 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 @@ -64,7 +64,7 @@ - name: Install distro packages package: name: "nginx" - update_cache: "{{ (ansible_facts['pkg_mgr'] in ['apt', 'zypper']) | ternary('yes', omit) }}" + update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" register: install until: install is success retries: 5