Complex loops?

Hi,

Given the following structure:

roles/bugzilla/vars/main.yml:

bugzilla:
vhost:
name: x
stuff: c

roles/subversion/vars/main.yml:

subversion:
vhost:
name: y
stuff: d

I’m trying to do the following

playbook.yml:

  • name: x

    roles:
  • { role: apache, vhosts: [ ‘subversion’, ‘bugzilla’ ] }

roles/apache/tasks/main.yml:

  • name: render vhosts
    template:
    src: {{ item[‘vhost’][‘name’] }}.conf

    with_items:
  • vhosts

I would expect that the with_items loops evaluated ‘vhosts’ to subversion and bugzilla and in term give me access to the underlying structure of those variables, thus bugzilla.vhost.name etc. however I can’t seem to get this to work.
What am I doing wrong here? Or is this simply not supported?

Thanks,
Nico