- hosts: TachyonMaster
  tasks:
    - include: roles/zookeeper/tasks/main.yml
      when: tachyon_masters > 1

- hosts: TachyonMaster*
  tasks:
    - name: set master address to own hostname
      shell: sed -i "s/export TACHYON_MASTER_ADDRESS=.*/export TACHYON_MASTER_ADDRESS=$(hostname -A | cut -d' ' -f1)/g" /tachyon/conf/tachyon-env.sh

    - include: roles/tachyon/tasks/start_master.yml

- hosts: all
  tasks:
    - include: roles/tachyon/tasks/start_worker.yml

- hosts: TachyonMaster
  tasks:
    - include: roles/zookeeper/tasks/main.yml
      when: tachyon_masters > 1

- hosts: TachyonMaster*
  tasks:
    - name: set master address to own hostname
      shell: sed -i "s/export TACHYON_MASTER_ADDRESS=.*/export TACHYON_MASTER_ADDRESS=$(hostname -A | cut -d' ' -f1)/g" /tachyon/conf/tachyon-env.sh

    - name: set journal folder as a shared undered folder in underfs
      shell: echo 'tachyon.master.journal.folder=${tachyon.underfs.address}/tachyon/journal/' >> /tachyon/conf/tachyon-site.properties

    - include: roles/tachyon/tasks/start_master.yml

- hosts: all
  tasks:
    - include: roles/tachyon/tasks/start_worker.yml

Set journal folder as a shared folder in ufs
Set journal folder as a shared folder in ufs
