ansible task -easy_install with requirements.txt file I want to run easy_install task in order to install many modules in virtual environment.

Is there an option to install all modules in requirements.txt file? as I understand it accept only one module at a time.

Another option is to do it with with_items but how can I make Ansible 
iterate over both the name and the version of each module

- name: Install things 
  easy_install:
   name: pip
   state: latest


I want certain versions obviously...

I can not work with Pip task, only easy_install.
Thanks
You can loop with dictionaries using loop. It doesn't look like the easy_install module handles versions with a module attribute, so you might have t pass the version on the name attribute.

- name: install things with easy_install
  easy_install:
    name: "{{ item.name }}=={{item.version}}"
    state: present
  loop:
    - { name: 'pip', version: '18.1' }