---
- name: Mount volumes
  include_tasks: mount_volume.yml
  with_dict: "{{ domain.volumes }}"
  vars:
    name: "{{ volume.key }}"
    path: "{{ volume.value.mount }}"
    server_group: "{{ domain.servers }}"
    domain_servers: "{{ groups[domain.servers] | map('extract', hostvars, 'ands_storage_hostname') | list }}"
  when: volume.value.mount is defined
  loop_control:
    loop_var: volume