Skip to content

Commit

Permalink
UnixPB: Add all the tags from the sub folder tasks to main.yml of Com…
Browse files Browse the repository at this point in the history
…mon role
  • Loading branch information
aswinkr77 authored and karianna committed Jun 10, 2024
1 parent 7b4fa1c commit 03b96fd
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

- name: Checking for /usr/lib/jvm
stat: path=/usr/lib/jvm
Expand All @@ -31,11 +32,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 +45,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 +53,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 +65,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 +73,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 +85,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 +93,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 @@ -58,6 +59,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
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 Expand Up @@ -129,6 +130,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down Expand Up @@ -124,21 +125,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 @@ -38,6 +38,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down Expand Up @@ -137,16 +138,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 @@ -39,6 +39,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down Expand Up @@ -87,23 +88,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 +118,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 +127,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 @@ -45,6 +45,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down Expand Up @@ -118,12 +119,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 +138,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
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
- name: Set package manager var
set_fact:
package_var: "latest"
tags: [build_tools, test_tools]

- name: Set package manager var for FreeBSD
set_fact:
package_var: "present"
when:
- ansible_distribution == "FreeBSD"
tags: [build_tools, test_tools]

- name: Install Build Tool Packages
package: "name={{ item }} state={{ package_var }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@
########################
- name: Include OS variables
include_vars: "../vars/{{ ansible_distribution }}.yml"
tags: main
tags: [build_tools, install_java, main, test_tools]

##############################
# OS setup and configuration #
##############################
# If this errors, upgrade ansible to >=2.4
- name: Perform OS setup and configuration
include_tasks: "{{ ansible_distribution }}.yml"
tags: main
tags: [adoptopenjdk, azul-key, brew_cu, brew_upgrade, build_tools, build_tools_jfx, core_dump, cups, default_java,
expat, freetype, install_java, java8_SLES11, java8_SUSE, jck_tools, jenkins_user, kernel_tuning, libffi_sles,
locales, main, patch_update, rosetta, solaris_studio, SUSE_gcc48, test_tools, zlib]

###################
# cmake on armv7l #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down

0 comments on commit 03b96fd

Please sign in to comment.