# Pip module reinstalls packages every time

**URL:** <https://forum.ansible.com/t/pip-module-reinstalls-packages-every-time/27234>\
**Category:** Ansible Project\
**Created:** [April 11, 2018, 12:12am UTC](https://forum.ansible.com/t/pip-module-reinstalls-packages-every-time/27234 "2018-04-11T00:12:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy\_Knights](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Post date:** [April 11, 2018, 12:12am UTC](https://forum.ansible.com/t/pip-module-reinstalls-packages-every-time/27234/1 "2018-04-11T00:12:34Z")

</div>

A task I have uses the pip module in conjunction with ‘with\_items’ to install different ansible packages, like so:

- name: install ansible versions  
pip:  
name: ansible  
version: “{{ item }}”  
extra\_args: “–install-option="–prefix=/opt/ansible/ansible-{{ item }}"”  
state: present  
with\_items:
- 2.2.1.0
- 2.3.0.0
- 2.3.1.0
- 2.4.2.0
- 2.4.4.0

Every time we run the playbook Ansible reinstalls the packages even though they are definitely there on the host. Any ideas why?

Thanks,  
Guy
