Skip to content

Commit

Permalink
separate the taks for installing the java version
Browse files Browse the repository at this point in the history
  • Loading branch information
inravpra committed Jun 13, 2022
1 parent e822cf9 commit a4d92dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ansible/roles/setup-kafka/tasks/install_binary_Debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: install java using the link
apt:
deb: https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.deb
state: present
4 changes: 4 additions & 0 deletions ansible/roles/setup-kafka/tasks/install_binary_RedHat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: install java using the link
yum:
deb: https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.rpm
state: present
10 changes: 4 additions & 6 deletions ansible/roles/setup-kafka/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

- name: install package java-common
apt:
package:
name: java-common
update_cache: true

Expand All @@ -9,12 +9,10 @@
path: /usr/lib/jvm/java-11-amazon-corretto/bin/java
register: stat_java

- name: install java using the link
apt:
deb: https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.deb
state: present
- name: "including installation task for {{ ansible_os_family }}"
include_tasks: "install_binary_{{ ansible_os_family }}.yml"
when: not stat_java.stat.exists

- name: check the binary file already downloaded or not
stat:
path: "/opt//kafka_2.13-{{ kafka_version }}"
Expand Down

0 comments on commit a4d92dc

Please sign in to comment.