From: Kienan Stewart Date: Thu, 22 Feb 2024 15:06:56 +0000 (-0500) Subject: ansible: Install java 1.8 on SLES nodes X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ed6030596647f28c4956c7ad1922206c7e45da9e;p=lttng-ci.git ansible: Install java 1.8 on SLES nodes Change-Id: I1bc39aa6b8e57a1ade363e14f8255a3ef439c58d Signed-off-by: Kienan Stewart --- diff --git a/automation/ansible/roles/common-node/tasks/setup-Suse.yml b/automation/ansible/roles/common-node/tasks/setup-Suse.yml index c94f6fb..801dede 100644 --- a/automation/ansible/roles/common-node/tasks/setup-Suse.yml +++ b/automation/ansible/roles/common-node/tasks/setup-Suse.yml @@ -1,4 +1,14 @@ --- + +- name: Activate SLES Products + when: ansible_distribution == 'SLES' + include_role: + name: suse + tasks_from: product + loop: "{{common_node_products|default([])}}" + loop_control: + loop_var: 'product' + - name: Ensure common_node patterns are installed. zypper: "name={{ common_node_patterns }} type=pattern state=present update_cache=yes" diff --git a/automation/ansible/roles/common-node/vars/SLES-12.yml b/automation/ansible/roles/common-node/vars/SLES-12.yml index eddf09e..4886367 100644 --- a/automation/ansible/roles/common-node/vars/SLES-12.yml +++ b/automation/ansible/roles/common-node/vars/SLES-12.yml @@ -12,6 +12,8 @@ common_node_packages: - flex - gettext-runtime - git-core + - java-1_8_0-openjdk-devel + - java-1_8_0-openjdk-headless - java-11-openjdk-devel - java-11-openjdk-headless # - jq diff --git a/automation/ansible/roles/common-node/vars/SLES-15.yml b/automation/ansible/roles/common-node/vars/SLES-15.yml index 5bfff83..cc7c1d4 100644 --- a/automation/ansible/roles/common-node/vars/SLES-15.yml +++ b/automation/ansible/roles/common-node/vars/SLES-15.yml @@ -11,6 +11,8 @@ common_node_packages: - flex - gettext-runtime - git-core + - java-1_8_0-openjdk-devel + - java-1_8_0-openjdk-headless - java-11-openjdk-devel - java-11-openjdk-headless - jq @@ -25,3 +27,9 @@ common_node_packages: - sudo # - tree - vim + +common_node_products: + # Required for sle-module-legacy + - sle-module-server-applications + # For java 1.8 + - sle-module-legacy diff --git a/automation/ansible/roles/common-node/vars/Suse.yml b/automation/ansible/roles/common-node/vars/Suse.yml index 25ab51c..7cbadc1 100644 --- a/automation/ansible/roles/common-node/vars/Suse.yml +++ b/automation/ansible/roles/common-node/vars/Suse.yml @@ -12,6 +12,8 @@ common_node_packages: - flex - gettext-runtime - git-core + - java-1_8_0-openjdk-devel + - java-1_8_0-openjdk-headless - java-11-openjdk-devel - java-11-openjdk-headless # - jq @@ -25,3 +27,6 @@ common_node_packages: - sudo - tree - vim + +# For SLES +common_node_products: []