Skip to content

Commit

Permalink
UnixPB: Add tags to tasks in Common role
Browse files Browse the repository at this point in the history
  • Loading branch information
aswinkr77 committed Jun 27, 2024
1 parent c96f2d5 commit 396cc07
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@

- name: Install JDK for x64
when: ansible_architecture == "x86_64"
tags: build_tools
block:
- name: Check if zulu-7 is already installed in the target location
stat: path=/usr/lib/jvm/zulu7
register: zulu7_installed
tags: build_tools

- name: Install latest zulu-7 release if not already installed
unarchive:
Expand All @@ -44,7 +44,6 @@
remote_src: yes
when:
- not zulu7_installed.stat.exists
tags: build_tools

- name: Create symlink to point at zulu-7
file:
Expand All @@ -53,12 +52,10 @@
state: link
when:
- not zulu7_installed.stat.exists
tags: build_tools

- name: Check if zulu-14 is already installed in the target location
stat: path=/usr/lib/jvm/zulu14
register: zulu14_installed
tags: build_tools

- name: Install latest zulu-14 release if not already installed
unarchive:
Expand All @@ -67,7 +64,6 @@
remote_src: yes
when:
- not zulu14_installed.stat.exists
tags: build_tools

- name: Create symlink to point at zulu-14
file:
Expand All @@ -76,12 +72,10 @@
state: link
when:
- not zulu14_installed.stat.exists
tags: build_tools

- name: Check if zulu-15 is already installed in the target location
stat: path=/usr/lib/jvm/zulu15
register: zulu15_installed
tags: build_tools

- name: Install latest zulu-15 release if not already installed
unarchive:
Expand All @@ -90,7 +84,6 @@
remote_src: yes
when:
- not zulu15_installed.stat.exists
tags: build_tools

- name: Create symlink to point at zulu-15
file:
Expand All @@ -99,7 +92,6 @@
state: link
when:
- not zulu15_installed.stat.exists
tags: build_tools

- name: Install JDK for aarch64
when: ansible_architecture == "aarch64"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- name: Check For Centos8 Stream
shell: cat /etc/centos-release
register: relfile_contents
tags: build_tools

- name: Enable EPEL release (not CentOS8)
yum:
Expand Down Expand Up @@ -136,7 +137,6 @@
- ansible_distribution_major_version == "6"
tags: build_tools


- name: Install CentOS SCL x86_64 repo for gcc7.3
package: "name=centos-release-scl state=latest"
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#########################################
- name: Allow https apt sources
package: "name=apt-transport-https state=latest"
tags: patch_update

- name: Add the openjdk repository to apt for openjdk7
apt_repository: repo='ppa:openjdk-r/ppa' update_cache=no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,25 @@
- not (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64")
- not (ansible_distribution_major_version == "8")
- not (ansible_distribution_major_version == "35" and ansible_distribution == "Fedora")
tags: install_java

- name: Install Java when RedHat 6 on ppc64
package: "name={{ item }} state=latest"
with_items: "{{ Java_RHEL6_PPC64 }}"
when: (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64")
tags: install_java

- name: Install Java when RedHat 8
package: "name={{ item }} state=latest"
with_items: "{{ Java_RHEL8 }}"
when: (ansible_distribution_major_version == "8")
tags: install_java

- name: Install Java when Fedora 35
package: "name={{ item }} state=latest"
with_items: "{{ Java_FED35 }}"
when: (ansible_distribution_major_version == "35" and ansible_distribution != "Fedora")
tags: install_java

####################
# Set default Java #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,19 @@
when:
- not (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64")
- not (ansible_distribution_major_version == "8")
tags: install_java

- name: Install Java when RedHat 6 on ppc64
package: "name={{ item }} state=latest"
with_items: "{{ Java_RHEL6_PPC64 }}"
when: (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64")
tags: install_java

- name: Install Java when RedHat 8
package: "name={{ item }} state=latest"
with_items: "{{ Java_RHEL8 }}"
when: (ansible_distribution_major_version == "8")
tags: install_java

####################
# Set default Java #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,20 @@

- name: Install Git SLES 12 SP5
when: (ansible_distribution_major_version == "12" and ansible_distribution_version == "12.5")
tags: build_tools
block:
- name: Test if Git Is Installed At /usr/local/bin
shell: /usr/local/bin/git --version >/dev/null
failed_when: false
register: git_installed
changed_when: false
tags:
- build_tools

- name: Test if git is installed at the correct version
shell: /usr/local/bin/git --version | sed -e 's/git version //g' | awk -F'[.]' '{print $1 "." $2}'
when:
- git_installed.rc == 0
register: git_version
changed_when: false
tags:
- build_tools

- name: Get Git Source
get_url:
Expand All @@ -120,8 +117,6 @@
chdir: /tmp
when:
- (git_installed.rc != 0) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt'))
tags:
- build_tools

- name: Compile Git 2.31.0
shell: |
Expand All @@ -131,8 +126,6 @@
gmake install
when:
- (git_installed.rc != 0) or (git_installed.rc == 0 and git_version.stdout is version_compare('2.31', operator='lt'))
tags:
- build_tools

- name: Install additional build tools for SLES 11
package: "name={{ item }} state=latest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@
with_items: "{{ Additional_Packages_Ubuntu16 }}"
when:
- ansible_distribution_major_version == "16"
tags: test_tools

- name: Install additional Packages specific to Ubuntu 18
package: "name={{ item }} state=latest"
with_items: "{{ Additional_Packages_Ubuntu18 }}"
when:
- ansible_distribution_major_version == "18"
tags: test_tools

- name: Download LibFFI6 v3.2.1_8 For Ubuntu 20 or 22 on S390X
get_url:
Expand All @@ -135,12 +137,14 @@
when:
- (ansible_distribution_major_version == "20" and ansible_architecture == "s390x") or
(ansible_distribution_major_version == "22" and ansible_architecture == "s390x")
tags: test_tools

- name: Install LibFFI6 v3.2.1_8 For Ubuntu 20 or 22 on S390X
apt: deb="/tmp/libffi6_3.2.1-8_s390x.deb"
when:
- (ansible_distribution_major_version == "20" and ansible_architecture == "s390x") or
(ansible_distribution_major_version == "22" and ansible_architecture == "s390x")
tags: test_tools

####################
# Set default Java #
Expand Down

0 comments on commit 396cc07

Please sign in to comment.