Skip to content

Commit

Permalink
validate
Browse files Browse the repository at this point in the history
  • Loading branch information
aswinkr77 committed Sep 25, 2023
1 parent f7793b4 commit 8c836fa
Showing 1 changed file with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit 8c836fa

Please sign in to comment.