Skip to content

Commit

Permalink
Upgrade Ant on windows and aix
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroon-Khel committed Oct 2, 2024
1 parent c9bab94 commit aaf9726
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Vendor_Playbook: /Vendor_Files/Vendor_Playbook/Vendor.yml
Asian_Locales: Disabled
Slack_Notification: Disabled

ant_version: 1.10.15
ant_checksum: sha512:1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9

key:
apache_ant: CE8075A251547BEE249BC151A2115AE15F6B8B72 # Stefan Bodewig <bodewig@apache.org>
apache_ant: 0A123C1ED3F13A6A0140E166C71FB765CD9DE313 # Jaikiran Pai <jaikiran@apache.org>
adoptium: 3B04D753C9050D9A5D343F39843C48A565F8F04B # Adoptium GPG Key (DEB/RPM Signing Key) <[email protected]>
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@

- name: Download Apache Ant
get_url:
url: https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.9-bin.zip
dest: /tmp/apache-ant-1.9.9-bin.zip
url: https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip
dest: /tmp/apache-ant-{{ ant_version }}-bin.zip
mode: 0440
timeout: 25
when: ant.stat.islnk is not defined

- name: GPG Signature verification
script: ../Supporting_Scripts/package_signature_verification.sh -f /tmp/apache-ant-1.9.9-bin.zip -sl "https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.9-bin.zip.asc" -k {{ key.apache_ant }}
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.stat.islnk is not defined

- name: Unarchive Ant
unarchive:
src: /tmp/apache-ant-1.9.9-bin.zip
src: /tmp/apache-ant-{{ ant_version }}-bin.zip
dest: /opt
copy: False
when: ant.stat.islnk is not defined

- name: Create symlink for ant
file: src=/opt/apache-ant-1.9.9/bin/ant dest=/usr/bin/ant state=link
file: src=/opt/apache-ant-{{ ant_version }}/bin/ant dest=/usr/bin/ant state=link
when: ant.stat.islnk is not defined
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ Nagios_Plugins: Disabled
bootjdk: hotspot
heapsize: normal

ant_version: 1.10.15
ant_checksum: 1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9

## Nagios Server Details
Nagios_Master_IP: 78.47.239.96

# GPG Public Keys
key:
apache_ant: CE8075A251547BEE249BC151A2115AE15F6B8B72 # Stefan Bodewig <bodewig@apache.org>
apache_ant: 0A123C1ED3F13A6A0140E166C71FB765CD9DE313 # Jaikiran Pai <jaikiran@apache.org>
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Apache ANT Installation #
###########################

- name: Test if Ant is already installed
- name: Test if Ant {{ ant_version }} is already installed
win_stat:
path: 'C:\apache-ant\apache-ant-1.10.5'
path: 'C:\apache-ant\apache-ant-{{ ant_version }}'
register: ant_installed
tags: ANT

Expand All @@ -17,11 +17,11 @@

- name: Download Apache ANT
win_get_url:
url: https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip
url: https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip
dest: c:\temp\ant.zip
force: no
checksum: 9028e2fc64491cca0f991acc09b06ee7fe644afe41d1d6caf72702ca25c4613c
checksum_algorithm: sha256
checksum: "{{ ant_checksum }}"
checksum_algorithm: sha512
when: (not ant_installed.stat.exists) and (not ant_download.stat.exists)
register: ant_download
tags: ANT
Expand All @@ -31,7 +31,7 @@
file: ../../GPG_signature_verification/tasks/main.yml
vars:
file_path: c:/temp/ant.zip
signature_link: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip.asc"
signature_link: "https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip.asc"
GPG_key: "{{ key.apache_ant }}"
when: (not ant_installed.stat.exists)
tags: ANT
Expand All @@ -45,7 +45,7 @@
tags: ANT

- name: Set ANT_HOME
raw: setx ANT_HOME "C:\apache-ant\apache-ant-1.10.5" /m
raw: setx ANT_HOME "C:\apache-ant\apache-ant-{{ ant_version }}" /m
when: (not ant_installed.stat.exists)
tags: ANT

Expand All @@ -59,7 +59,7 @@

- name: Test if ant-contrib is already installed
win_stat:
path: 'C:\apache-ant\apache-ant-1.10.5\lib\ant-contrib.jar'
path: 'C:\apache-ant\apache-ant-{{ ant_version }}\lib\ant-contrib.jar'
register: ant_contrib_installed
tags: ANT

Expand All @@ -84,7 +84,7 @@
- name: Copy the ant-contrib.jar to ANT's lib folder
win_copy:
src: C:\temp\ant-contrib\ant-contrib\lib\ant-contrib.jar
dest: C:\apache-ant\apache-ant-1.10.5\lib\ant-contrib.jar
dest: C:\apache-ant\apache-ant-{{ ant_version }}\lib\ant-contrib.jar
remote_src: True
when: (not ant_contrib_installed.stat.exists)
tags: ANT
Expand Down

0 comments on commit aaf9726

Please sign in to comment.