Right after I posted this I tried uninstalling ndg-httpsclient manually 
(should've tried that first I guess) and I got this error:

Not uninstalling ndg-httpsclient at /usr/lib/python2.7/dist-packages, owned 
by OS

This was while logged in as root too. Anyway, I ended up having to manually 
remove the package files in /usr/lib/python2.7/dist-packages which finally 
worked.

Just noting this here in case it's useful info.

Thanks,
Guy

On Wednesday, April 18, 2018 at 1:59:56 PM UTC-7, Guy Knights wrote:
>
> 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:
>
>
> <https://lh3.googleusercontent.com/-Mq2uxZVLrZc/WtexMOrAZHI/AAAAAAAAEGE/CsZt-f13YZYF5WauLMa7Xp0EPTI3XyEkwCLcBGAs/s1600/server_pip_package_before.png>
>
> Here's the task output from the ansible run:
>
>
> <https://lh3.googleusercontent.com/-p3L_npDnAds/WtexbLkOMiI/AAAAAAAAEGI/0VUahB4zDlQEfB1UJzK_PxNaVZ48mjIvwCLcBGAs/s1600/ansible_pip_run.png>
>
> Here's the output of pip freeze after the run:
>
>
> <https://lh3.googleusercontent.com/-Fz8xHE_bUKg/Wtexi3V7spI/AAAAAAAAEGM/b25LdhMcMPgZZHYhNT-byOr3LChwOvB1gCLcBGAs/s1600/server_pip_package_after.png>
>
>
> Can anyone explain why state: absent isn't working as expected?
>
>
> Thanks,
>
> Guy
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f47a09ba-2942-4876-9e37-f8c28ad875ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to