---
- hosts: all
  tasks:
  - name: Create a group of all hosts by operating system
    action: group_by key={{ansible_distribution}}-{{ansible_distribution_version}}

- hosts: testing-storage
  vars_files:
    - var
  sudo: yes
  roles:
    - common
    - storage

- hosts: testing-director
  vars_files:
    - var
  sudo: yes
  roles:
    - common
    - dir-client
    - director

- hosts: testing-almir
  vars_files:
    - var
  sudo: yes
  roles:
    - common
    - almir

---
- hosts: all
  tasks:
  - name: Create a group of all hosts by operating system
    action: group_by key={{ansible_distribution}}-{{ansible_distribution_version}}

- hosts: testing-director
  vars_files:
    - var
  sudo: yes
  roles:
    - common
    - dir-client
    - director

- hosts: testing-storage
  vars_files:
    - var
  sudo: yes
  roles:
    - common
    - storage

- hosts: testing-almir
  vars_files:
    - var
  sudo: yes
  roles:
    - common
    - almir

Install director first then storage
Install director first then storage
