From cfe75b1c02624cf5f59f394ef69a1317ff33b645 Mon Sep 17 00:00:00 2001 From: Eric Ball Date: Wed, 18 Nov 2020 16:53:23 -0800 Subject: [PATCH] Update path for "parallel" package The old URL is no longer reachable, causing build failures for packer builds. Molecule requirement has been changed to "molecule[docker]", due to a breaking change introduced in molecule 3.1.1, where docker was moved out of the default module. rpm_key blocks added for direct installs of packages in CentOS 8, as not having these GPG keys in place is now an error condition. Issue: IT-20979 Change-Id: I837419c2cd92f0ec19849f0a4da3ec5c36b2cb5e Signed-off-by: Eric Ball --- molecule/default/prepare.yml | 5 +++++ tasks/main.yml | 7 +++++++ tasks/pkg-names-RedHat.yaml | 2 +- tox.ini | 2 +- vars/RedHat.yaml | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index 85f9480..3940959 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -8,6 +8,11 @@ update_cache: yes when: ansible_distribution == 'Ubuntu' become: true + - rpm_key: + state: present + key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8 + when: ansible_os_family == 'RedHat' + become: true - name: Install EPEL repository yum: name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm diff --git a/tasks/main.yml b/tasks/main.yml index fec45d9..4dc72bd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -22,6 +22,13 @@ when: ansible_distribution == 'Ubuntu' and ansible_facts['distribution_major_version'] is version('20', '<') become: true +# Required for direct install of parallel package from linuxsoft.cern.ch +- rpm_key: + state: present + key: https://linuxsoft.cern.ch/cern/centos/7/os/x86_64/RPM-GPG-KEY-cern + when: ansible_os_family == 'RedHat' + become: true + - name: Install LF Recommended Tools package: name: "{{ lf_recommended_tools_packages }}" diff --git a/tasks/pkg-names-RedHat.yaml b/tasks/pkg-names-RedHat.yaml index c69f6a1..4c0cc2c 100644 --- a/tasks/pkg-names-RedHat.yaml +++ b/tasks/pkg-names-RedHat.yaml @@ -1,5 +1,5 @@ --- -pkg_gnu_parallel: http://ftp.riken.jp/Linux/cern/centos/7/cern/x86_64/Packages/parallel-20150522-1.el7.cern.noarch.rpm +pkg_gnu_parallel: https://linuxsoft.cern.ch/cern/centos/7/cern/x86_64/Packages/parallel-20150522-1.el7.cern.noarch.rpm pkg_netcat: nc pkg_perl_digest_sha: perl-Digest-SHA pkg_perl_extutils_makemaker: perl-ExtUtils-MakeMaker diff --git a/tox.ini b/tox.ini index 7194d1f..313edbd 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ deps = ansible~=2.9.6 ansible-lint~=4.2.0 docker - molecule + molecule[docker] pytest~=5.4.0 passenv = * commands = diff --git a/vars/RedHat.yaml b/vars/RedHat.yaml index 8885798..5a5c5cf 100644 --- a/vars/RedHat.yaml +++ b/vars/RedHat.yaml @@ -3,7 +3,7 @@ lf_recommended_tools_packages_distro: - bzip2 - fedora-packager - findutils - - http://ftp.riken.jp/Linux/cern/centos/7/cern/x86_64/Packages/parallel-20150522-1.el7.cern.noarch.rpm + - https://linuxsoft.cern.ch/cern/centos/7/cern/x86_64/Packages/parallel-20150522-1.el7.cern.noarch.rpm - nc - perl-Digest-SHA - perl-ExtUtils-MakeMaker -- 2.16.6