hadoop-ansible/roles/other-services/tasks/oozie-setup.yml

63 lines
1.7 KiB
YAML

---
- name: Install the oozie site configuration
template: src={{ item }}.j2 dest={{ oozie.conf_dir }}/{{ item }} owner=root group=root mode=0644
with_items:
- oozie-site.xml
notify:
- Restart oozie
tags:
- other-services
- oozie
- name: Get the extJS library
get_url: url=http://extjs.com/deploy/ext-2.2.zip dest=/var/lib/oozie/ext-2.2.zip
register: get_extjs
tags:
- other-services
- oozie
- name: Unpack the extJS library
raw: cd /var/lib/oozie; unzip /var/lib/oozie/ext-2.2.zip
when: get_extjs is changed
notify:
- Restart oozie
tags:
- other-services
- oozie
- name: Unpack the shared libs used by the oozie hdfs user
raw: mkdir -p /tmp/oshared; tar -C /tmp/oshared -xf /usr/lib/oozie/oozie-sharelib-mr1.tar.gz
register: unpack_shlibs
tags:
- other-services
- oozie
- name: Ensure that the oozie catalina base work dir exists
file: dest={{ oozie.catalina_work_dir }} state=directory owner={{ oozie.user }}
tags:
- other-services
- oozie
- name: Activate the oozie user on hdfs
remote_user: root
become: yes
become_user: hdfs
shell: . /etc/profile.d/jdk.sh ; hadoop fs -mkdir {{ mapred_staging_root_dir }}/oozie ; hadoop fs -chown oozie:oozie {{ mapred_staging_root_dir }}/oozie ; touch /var/lib/hadoop-hdfs/.oozie
args:
creates: /var/lib/hadoop-hdfs/.oozie
register: oozie_user
tags:
- other-services
- oozie
- name: Install the shared libraries for the oozie user
remote_user: root
become: yes
become_user: oozie
shell: . /etc/profile.d/jdk.sh ; cd /tmp/oshared ; hadoop fs -put share {{ mapred_staging_root_dir }}/oozie/share
ignore_errors: True
when: oozie_user is changed
tags:
- other-services
- oozie