2021-03-07 23:53:00 +01:00
|
|
|
---
|
|
|
|
|
2021-03-08 23:45:28 +01:00
|
|
|
- name: Download Hadoop archive
|
|
|
|
get_url:
|
|
|
|
url: "{{ hadoop_archive_url }}"
|
|
|
|
dest: "{{ script_path }}"
|
|
|
|
mode: 0600
|
|
|
|
checksum: sha256:273d5fa1d479d0bb96759b16cf4cbd6ba3e7f863a0778cbae55ab83417e961f0
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
- name: Copy archive
|
|
|
|
copy:
|
|
|
|
src: "{{ script_path }}/{{ hadoop_archive }}"
|
|
|
|
dest: "/tmp"
|
|
|
|
remote_src: yes
|
|
|
|
|
|
|
|
- name: Extract archive
|
|
|
|
ansible.builtin.unarchive:
|
|
|
|
src: "/tmp/{{ hadoop_archive }}"
|
|
|
|
dest: "{{ script_path }}"
|
|
|
|
remote_src: yes
|
|
|
|
|
|
|
|
- name: Write config template
|
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: "{{ script_path }}/hdfs/files/hadoop-config.sh"
|
|
|
|
delegate_to: localhost
|
2021-03-07 23:53:00 +01:00
|
|
|
|
|
|
|
- name: Create core-site.xml
|
|
|
|
template: src={{ hdfs_config_path}}/core-site.xml.j2 dest={{ hdfs_config_path}}/core-site.xml mode=0700
|
|
|
|
|
|
|
|
- name: Create hdfs-site.xml
|
|
|
|
template: src={{ hdfs_config_path}}/hdfs-site.xml.j2 dest={{ hdfs_config_path}}/hdfs-site.xml mode=0700
|
|
|
|
|
|
|
|
- name: Create mapred-site.xml
|
|
|
|
template: src={{ hdfs_config_path}}/core-site.xml.j2 dest={{ hdfs_config_path}}/mapred-site.xml mode=0700
|