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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/289332f7-bc67-40c4-8afd-bd5e637fb9bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to