hadoop-ansible/roles/hadoop_config/tasks/main.yml

35 lines
1.4 KiB
YAML

---
# Base environment for all the hadoop services
- name: Base environment for all the hadoop services
template: src=templates/bigtop-utils.default.j2 dest=/etc/default/bigtop-utils owner=root group=root mode=444
tags: [ 'hadoop', 'configuration' ]
- name: copy /etc/hadoop/conf.empty to {{ hadoop_conf_dir }}
command: creates={{ hadoop_conf_dir }} cp -R -p /etc/hadoop/conf.empty {{ hadoop_conf_dir }}
tags: [ 'hadoop', 'configuration' ]
- name: run 'update-alternatives' to set our hadoop configuration directory
alternatives: name=hadoop-conf link=/etc/hadoop/conf path={{ hadoop_conf_dir }}
tags: [ 'hadoop', 'configuration' ]
- name: Install the common configuration files
template: src={{ item }}.j2 dest={{ hadoop_conf_dir }}/{{ item }} owner=root group=root mode=444
with_items:
- slaves
- masters
- log4j.properties
tags: [ 'hadoop', 'configuration', 'log4j', 'hadoop_workers' ]
- name: Install the shared configuration files
template: src=templates/{{ item }}.j2 dest={{ hadoop_conf_dir }}/{{ item }} owner=root group=root mode=444
with_items:
- hadoop-env.sh
tags: [ 'hadoop', 'configuration' ]
- name: Install the mapreduce scheduler configuration file
template: src=templates/{{ item }}.j2 dest={{ hadoop_conf_dir }}/{{ item }} owner=root group=root mode=444
with_items:
- fair-scheduler.xml
when: mapred_use_fair_scheduler
tags: [ 'hadoop', 'configuration', 'scheduler' ]