Ansible: How to pip install with --upgrade

- name: install the package, force upgrade
  pip: 
    name: <your package name>
    state: latest

Or with:

- name: install the package, force reinstall to the latest version
  pip: 
    name: <your package name>
    state: forcereinstall

Eventually found the answer here: https://groups.google.com/forum/#!topic/ansible-project/a19JEpdXzck

this is the syntax:

- name: install the package, force upgrade
  pip: 
    name: <your package name>
    extra_args: --upgrade

Tags:

Pip

Ansible