| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| - name: "install fluo from tarball" |
| unarchive: src={{ tarballs_dir }}/{{ fluo_tarball }} dest={{ install_dir }} creates={{ fluo_home }} copy=yes |
| - name: "copy default fluo configuration (<1.2.0)" |
| command: cp {{ fluo_home }}/conf/examples/{{ item }} {{ fluo_home }}/conf/ creates={{ fluo_home }}/conf/{{ item }} |
| with_items: |
| - log4j.xml |
| - logback.xml |
| - fluo-env.sh |
| when: fluo_version < '1.2.0' |
| - name: "configure fluo (<1.2.0)" |
| template: src={{ item }} dest={{ fluo_home }}/conf/{{ item }} |
| with_items: |
| - fluo.properties |
| when: fluo_version < '1.2.0' |
| - name: "configure fluo (>=1.2.0)" |
| template: src={{ item }} dest={{ fluo_home }}/conf/{{ item }} |
| with_items: |
| - fluo-conn.properties |
| - fluo-app.properties |
| when: fluo_version >= '1.2.0' |
| - name: "fetch extra fluo dependencies" |
| command: "{{ fluo_home }}/lib/fetch.sh extra" |
| - name: "set correct owner & group" |
| file: path={{ fluo_home }} recurse=yes owner={{ cluster_user }} group={{ cluster_group }} |
| - name: "Add Hadoop conf folder to fluo classpath (fluo version == 1.2.0)" |
| replace: |
| path: "{{ fluo_home }}/conf/fluo-env.sh" |
| regexp: '# If fluo-conn.properties exists, then classpath does not need to include twill or logback' |
| replace: 'CLASSPATH="$CLASSPATH:$HADOOP_PREFIX/etc/hadoop"\n# If fluo-conn.properties exists, then classpath does not need to include twill or logback' |
| when: fluo_version == '1.2.0' |
| - name: "Add Hadoop native lib folder to fluo system lib load path (fluo version == 1.2.0)" |
| replace: |
| path: "{{ fluo_home }}/conf/fluo-env.sh" |
| regexp: 'export JAVA_OPTS' |
| replace: 'export JAVA_OPTS\ncase "$(uname)" in\n Darwin) export DYLD_LIBRARY_PATH="${HADOOP_PREFIX}/lib/native:${DYLD_LIBRARY_PATH}" ;;\n *) export LD_LIBRARY_PATH="${HADOOP_PREFIX}/lib/native:${LD_LIBRARY_PATH}" ;;\nesac' |
| when: fluo_version == '1.2.0' |