I'm trying to build a docker image using the docker_image module of ansible.
my playbook:
 - name: Install dependent python modules
   pip:
     name: "{{item}}"
     state: present
   with_items:
    - docker-py
 - name: Build container image for api
   docker_image:
      name: api
      path: /home/abc/api/ #location of my Dockerfile
Ans I encountered this error:
"msg": "Failed to import docker-py - No module named 'requests.packages.urllib3'. Try `pip install docker-py`"