From 8c836faa91d3284d05bfe48c78d9181c2e941679 Mon Sep 17 00:00:00 2001 From: Aswin K R Date: Mon, 25 Sep 2023 22:45:45 +0530 Subject: [PATCH] validate --- .../roles/GIT_Source/tasks/main.yml | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/GIT_Source/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/GIT_Source/tasks/main.yml index b5531eb382..d0dd9d425c 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/GIT_Source/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/GIT_Source/tasks/main.yml @@ -30,28 +30,29 @@ - name: Download git source get_url: - url: https://www.kernel.org/pub/software/scm/git/git-2.15.0.tar.xz - dest: /tmp/git-2.15.0.tar.xz + url: https://www.kernel.org/pub/software/scm/git/git-2.39.0.tar.xz + dest: /tmp/git-2.39.0.tar.xz mode: 0440 - checksum: sha256:107116489f10b758b51af1c5dbdb9a274917b0fb67dc8eaefcdabc7bc3eb3e6a + checksum: sha256:40a38a0847b30c371b35873b3afcf123885dd41ea3ecbbf510efa97f3ce5c161 + validate_certs: false retries: 3 delay: 5 register: git_download until: git_download is not failed when: - - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.15', operator='lt')) + - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt')) - ansible_distribution != "FreeBSD" tags: git_source - name: Extract git source unarchive: - src: /tmp/git-2.15.0.tar.xz + src: /tmp/git-2.39.0.tar.xz dest: /tmp/ extra_opts: - --no-same-owner copy: False when: - - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.15', operator='lt')) + - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt')) - ansible_distribution != "FreeBSD" tags: git_source @@ -64,29 +65,29 @@ tags: git_source - name: Compile and install git from source on RHEL/CentOS6 - shell: cd /tmp/git-2.15.0 && ./configure --with-curl={{ curl_install_dir.stdout }} --prefix=/usr/local --without-tcltk && make clean && make -j {{ ansible_processor_vcpus }} && make install + shell: cd /tmp/git-2.39.0 && ./configure --with-curl={{ curl_install_dir.stdout }} --prefix=/usr/local --without-tcltk && make clean && make -j {{ ansible_processor_vcpus }} && make install become: yes when: - - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.15', operator='lt')) + - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt')) - ansible_architecture != "s390x" - (( ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version == "6") tags: git_source - name: Compile and install git from source on everything else - shell: cd /tmp/git-2.15.0 && ./configure --prefix=/usr/local --without-tcltk && make clean && make -j {{ ansible_processor_vcpus }} && make install + shell: cd /tmp/git-2.39.0 && ./configure --prefix=/usr/local --without-tcltk && make clean && make -j {{ ansible_processor_vcpus }} && make install become: yes when: - - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.15', operator='lt')) + - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt')) - ansible_architecture != "s390x" - ansible_distribution != "FreeBSD" - not(( ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version == "6") tags: git_source - name: Compile and install git from source on s390x - shell: cd /tmp/git-2.15.0 && ./configure --prefix=/usr/local --without-tcltk && make -j {{ ansible_processor_cores }} && make install + shell: cd /tmp/git-2.39.0 && ./configure --prefix=/usr/local --without-tcltk && make -j {{ ansible_processor_cores }} && make install become: yes when: - - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.15', operator='lt')) + - (git_installed.rc != 0 ) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt')) - ansible_architecture == "s390x" - ansible_distribution != "FreeBSD" tags: git_source @@ -98,7 +99,7 @@ - perl-Git state: absent when: - - (git_installed.rc == 0 and git_version.stdout is version_compare('2.15', operator='lt')) + - (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt')) - ansible_distribution == "CentOS" or ansible_distribution == "RedHat" tags: - git_source @@ -109,7 +110,7 @@ name: git state: absent when: - - (git_installed.rc == 0 and git_version.stdout is version_compare('2.15', operator='lt')) + - (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt')) - ansible_distribution == "SLES" or ansible_distribution == "openSUSE" tags: - git_source @@ -120,7 +121,7 @@ path: "{{ item }}" state: absent with_items: - - /tmp/git-2.15.0 - - /tmp/git-2.15.0.tar.xz + - /tmp/git-2.39.0 + - /tmp/git-2.39.0.tar.xz failed_when: false tags: git_source