From dceb54b6c54d183938f1e079b366d4ae94daf267 Mon Sep 17 00:00:00 2001 From: Mahdi Ardekanian Date: Thu, 5 Dec 2024 11:16:36 -0500 Subject: [PATCH] unixPB: improves download and verify of ant binary by replacing command: wget with get_url module, it helps to support more systems. Also while running GPG Signature verification some systems (e.g old mac machines) have problem with wget while running package_signature_verification.sh. This change makes sure all systems will find wget in their PATH. Sigend-off-by: mahdi@ibm.com --- .../AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml index f8a4e981a9..895d25bff4 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml @@ -30,7 +30,9 @@ tags: ant - name: Download Apache Ant binaries (macOS) and (Solaris) - command: wget https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip -O /tmp/apache-ant-{{ ant_version }}-bin.zip + get_url: + url: https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip + dest: /tmp/apache-ant-{{ ant_version }}-bin.zip when: - ant_installed.rc != 0 - ansible_distribution == "MacOSX" or ansible_distribution == "Solaris" @@ -47,6 +49,8 @@ - name: GPG Signature verification script: ../Supporting_Scripts/package_signature_verification.sh -f /tmp/apache-ant-{{ ant_version }}-bin.zip -sl "https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip.asc" -k {{ key.apache_ant }} when: ant_installed.rc != 0 + environment: + PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin" tags: ant - name: Extract ant