Skip to content

Correct task name description #890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/hdfs_prepare/tasks/check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: global_var | Initialize
- name: check | Initialize
set_fact:
scale_hdfs_cluster: []
scale_protocol_nodes_list: []
Expand Down
24 changes: 12 additions & 12 deletions roles/hdfs_prepare/tasks/java_home.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
---
- name: global_var | Initialize
- name: java_home | Initialize
set_fact:
scale_hdfs_nodes_list: []
scale_hdfs_namenodes_list: []
scale_hdfs_datanodes_list: []

- name: global_var | Collect all HDFS NameNodes
- name: java_home | Collect all HDFS NameNodes
set_fact:
scale_hdfs_namenodes_list: "{{ item.namenodes | unique }}"
delegate_to: localhost
run_once: true

- name: global_var | Collect all HDFS DataNodes
- name: java_home | Collect all HDFS DataNodes
set_fact:
scale_hdfs_datanodes_list: "{{ item.datanodes | unique }}"
delegate_to: localhost
run_once: true

- name: global_var | Get HDFS nodes
- name: java_home | Get HDFS nodes
set_fact:
scale_hdfs_nodes_list: "{{ scale_hdfs_namenodes_list + scale_hdfs_datanodes_list }}"

- name: global_var | make unique HDFS nodes
- name: java_home | make unique HDFS nodes
set_fact:
scale_hdfs_nodes_list: "{{ scale_hdfs_nodes_list | unique }}"

- name: check | Check if atleast one hdfs node is configured
- name: java_home | Check if atleast one hdfs node is configured
assert:
that:
- scale_hdfs_nodes_list|length > 0
fail_msg: "No hdfs nodes configured"

- name: check | Fetch JAVA_HOME path
- name: java_home | Fetch JAVA_HOME path
shell: echo $JAVA_HOME
register: java_path
when: ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | Check JAVA_HOME path exist
- name: java_home | Check JAVA_HOME path exist
stat:
path: "{{ java_path.stdout }}"
register: java_path_details
when: ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | Assert JAVA_HOME path exist
- name: java_home | Assert JAVA_HOME path exist
assert:
that:
- java_path_details.stat.exists
fail_msg: The JAVA_HOME path does not exists !
when: ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | Set path of JAVA_HOME
- name: java_home | Set path of JAVA_HOME
set_fact:
javahome_path: "{{ java_path.stdout }}"
when:
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list

- name: check | verify JAVA
- name: java_home | verify JAVA
command: "ls {{ javahome_path }}/bin/java"
register: jvm_list
when:
Expand All @@ -68,7 +68,7 @@
- ansible_fqdn in scale_hdfs_nodes_list or inventory_hostname in scale_hdfs_nodes_list
- jvm_list.rc != 0

- name: Check and fetch gpfs.hdfs-protocol version
- name: java_home | Check and fetch gpfs.hdfs-protocol version
shell: "rpm -q gpfs.hdfs-protocol --qf %{VERSION}-%{RELEASE}"
register: gpfs_hdfs_protocol_version
when:
Expand Down