- hosts: AlluxioMaster
  tasks:
    - include: roles/zookeeper/tasks/main.yml
      when: alluxio_masters > 1

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

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

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

- hosts: AlluxioMaster
  tasks:
    - include: roles/zookeeper/tasks/main.yml
      when: alluxio_masters > 1

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

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

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

Fix vagrant script setting master hostname
Fix vagrant script setting master hostname
