title: Is there a way to loop on two variables when importing an Ansible role?
body: <p>I'm importing an Ansible role in a play and running its 'install' task.The role is meant to create VMs on an hypervisor like Vbox and works fine. 
  However, I want to use it to create several VMs at the same time, and I must provide 2 variables for this purpose :
  - vm_ip : the ip of the vm to be created
  - vm_name : the name of the vm to be created</p>
  
  <p>I have already tried almost everything with loops, with_items and other things. For instance, this code doesn't work : </p>
  
  <pre><code>- name: Create VMs
    hosts: localhost
    tasks:
    - import_role:
        name: vm_creation
        tasks_from: install
      vars:
        vm_ip: "{{ item.ips }}"
        vm_name: "{{ item.names }}"
        loop:
          - { ips: '192.168.20.4', names: 'test4' }
          - { ips: '192.168.20.5', names: 'test5' }
  </code></pre>
  
  <p>It is supposed to create both .20.4 and .20.5 VM's but the play crashes telling me this :"The task includes an option with an undefined variable. The error was: 'item' is undefined</p>