You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.2 KiB
YAML

---
# HDFS datanode
- name: Ensure that the hdfs data disks are mounted
mount: name={{ item.mountpoint }} src=/dev/{{ item.device }} fstype={{ item.fstype }} state=mounted
with_items: hadoop_hdfs_data_disk
when: ansible_fqdn | match ("node.*\.t\.hadoop\.research\-infrastructures\.eu")
tags:
- hdfs
- datanodes
- disk
- name: Set the vm.swappiness parameter
sysctl: name=vm.swappiness value={{ worker_node_swappiness }} sysctl_file=/etc/sysctl.d/90-swappiness.conf state=present reload=yes
when: ansible_fqdn | match ("node.*\.t\.hadoop\.research\-infrastructures\.eu")
tags:
- hdfs
- datanodes
- name: Install the HDFS datanode config files.
template: src=templates/{{ item }}.j2 dest={{ hadoop_conf_dir }}/{{ item }} owner=root group=root mode=0444
with_items:
- core-site.xml
notify:
- Restart HDFS datanode
tags:
- datanode
- hdfs
- name: Ensure that the hdfs shortcircuit cache directory exists
file: dest={{ hdfs_read_shortcircuit_cache_dir }} state=directory owner=hdfs group=hdfs mode=0755
when:
- ansible_fqdn | match ("node.*\.t\.hadoop\.research\-infrastructures\.eu")
- hdfs_read_shortcircuit
tags:
- datanode
- hdfs
- name: Install the HDFS datanode config files.
template: src=templates/datanode-hdfs-site.xml.j2 dest={{ hadoop_conf_dir }}/hdfs-site.xml owner=root group=root mode=0444
notify:
- Restart HDFS datanode
tags:
- datanode
- hdfs
- hdfs_site
- name: Check if the hadoop-jmx conf directory exists
stat: path=/etc/hadoop-jmx/conf
register: check_jmx_confdir
- name: Distribute the jmx authorization files for hadoop hdfs
template: src=templates/jmxremote.passwd.j2 dest=/etc/hadoop-jmx/conf/jmxremote.passwd owner=hdfs mode=0600
when: check_jmx_confdir.stat.exists and hadoop_jmx_enabled
notify:
- Restart HDFS datanode
tags:
- hadoop
- hdfs
- jmx
- name: Distribute the jmx role files for hadoop hdfs
copy: src=files/jmxremote.access dest=/etc/hadoop-jmx/conf/jmxremote.access owner=root mode=0644
when: check_jmx_confdir.stat.exists and hadoop_jmx_enabled
notify:
- Restart HDFS datanode
tags:
- hadoop
- hdfs
- jmx