---

- hosts: all
  remote_user: root
  roles:
    - common
  any_errors_fatal: true
- hosts: spark
  remote_user: root
  vars_files:
   - vars/spark_vars.yml
  roles:
    - spark
  any_errors_fatal: true
- hosts: spark-master
  remote_user: root
  roles:
    - spark-master
- hosts: spark
  remote_user: root
  roles:
    - spark-slave

---

- hosts: all
  remote_user: root
  roles:
    - common
  any_errors_fatal: true

#- hosts: spark
#  remote_user: root
#  vars_files:
#   - vars/spark_vars.yml
#   - vars/minio_vars.yml
#  roles:
#    - spark
#  any_errors_fatal: true

- hosts: spark-master
  remote_user: root
  vars_files:
   - vars/spark_vars.yml
   - vars/minio_vars.yml
  roles:
    - spark-master

- hosts: spark
  remote_user: root
  vars_files:
   - vars/spark_vars.yml
   - vars/minio_vars.yml
  roles:
    - spark-slave

Load global variables. Since we have dependencies between spark-slave and spark, and the same holds for spark-master and spark, no need to run spark role.
Load global variables. Since we have dependencies between spark-slave and spark, and the same holds for spark-master and spark, no need to run spark role.
