EDIT: although this answers this question, I think the mgsk answer is the best answer, since I agree that this is not the right way to get around this with Ansible.
This should fix your problem:
- name: install pip
shell: "python <(curl https://bootstrap.pypa.io/get-pip.py)" executable=/bin/bash
If you are interested in the difference between the two commands:
python <(curl https://bootstrap.pypa.io/get-pip.py)
python <$(curl https://bootstrap.pypa.io/get-pip.py)
, bash, /bin/sh , curl ( python script), python, python script.
- , python script, curl,