From 617581afbfeea6ee09171207538403a9653a8b2a Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Jul 17 2023 12:01:29 +0000 Subject: Simply use curl instead of get_url module In a context where rawhide is the target machine for ansible then it might happen an incompatibility between the zuul-executor ansible version and the target machine python version. Then this change instead use shell: curl instead of get_url ansible module to avoid the following issue: ``` An unknown error occurred: 'CustomHTTPSConnection' object has no attribute 'cert_file' ``` --- diff --git a/roles/repo-install-rpm/tasks/install_repo_packages.yaml b/roles/repo-install-rpm/tasks/install_repo_packages.yaml index a8d7437..bd710b5 100644 --- a/roles/repo-install-rpm/tasks/install_repo_packages.yaml +++ b/roles/repo-install-rpm/tasks/install_repo_packages.yaml @@ -22,11 +22,11 @@ exclude: '{% for x in install_repo_exclude|default([]) %}--exclude "{{ x }}" {% endfor %}' - name: Download packages locally - get_url: - url: "{{ item }}" - dest: "{{ repo_path }}" - become: true + shell: curl --fail -OL {{ item }} loop: "{{ repoquery.stdout_lines }}" + become: true + args: + chdir: "{{ repo_path }}" - name: Install changes generated packages shell: dnf install -y {{ repo_path }}/*.rpm diff --git a/roles/repo-install-rpm/tasks/main.yaml b/roles/repo-install-rpm/tasks/main.yaml index 4b34b20..3161201 100644 --- a/roles/repo-install-rpm/tasks/main.yaml +++ b/roles/repo-install-rpm/tasks/main.yaml @@ -3,6 +3,7 @@ yum: name: - dnf-utils + - curl state: latest become: yes