I recently upgraded to Ansible 2.4 and have run into a weird problem. I added a task to remove a python package that was breaking pip on one of our servers, the task is below:
- name: Remove pip package ndg-httpsclient as it breaks pip
pip:
name: ndg-httpsclient
state: absent
When this task is run on a server that definitely has ndg-httpsclient installed (as per pip freeze), it does not register a change. If I check the package list after the run, it’s still listed as installed (and pip is still broken).
Here’s a screenshot of the output of pip freeze before the ansible run:
Here’s the task output from the ansible run:
Here’s the output of pip freeze after the run:
Can anyone explain why state: absent isn’t working as expected?
Thanks,
Guy