Intermittent failures when using easy_install

15 views
Skip to first unread message

SurferL

unread,
Apr 6, 2018, 4:34:42 AM4/6/18
to Ansible Project
Running Ansible 2.4.1.

So sometimes running my task works, and other times it doesn't and I don't understand why this is happening...

The task is: 

- name: mac | Install global python dependencies
  easy_install:
    name: "{{ item }}"
    state: latest
  become: true
  with_items:
    - pip
    - virtualenv

and it occasionally fails with: 

vmware-vmx: TASK [common : mac | Install global python dependencies] ***********************
vmware-vmx: failed: [default] (item=pip) => {"changed": false, "failed": true, "item": "pip", "msg": "Couldn't find index page for 'pip' (maybe misspelled?)\nNo local packages or download links found for pip\nerror: Could not find suitable distribution for Requirement.parse('pip')\n"}
vmware-vmx: failed: [default] (item=virtualenv) => {"changed": false, "failed": true, "item": "virtualenv", "msg": "Couldn't find index page for 'virtualenv' (maybe misspelled?)\nNo local packages or download links found for virtualenv\nerror: Could not find suitable distribution for Requirement.parse('virtualenv')\n"}


But it sometimes passes?

Can anyone shed any light on why this happens or what I can change to my task?

Thanks!

Biswadip Dutta

unread,
Apr 6, 2018, 10:11:52 AM4/6/18
to ansible...@googlegroups.com
I am a newbie so don't expect this to be the correct answer.  Be sure to correct me if I am wrong.
I'll suggest using apt or yum module to install pip and then pip module to install virtualenv and check if the problem persists. If these also fail then we can always use the shell module to directly run ad-hoc commands.
This might be helpful. 


Regards,
Biswadip Dutta

--
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+unsubscribe@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/8aeeef1d-909a-4cc9-aea7-c66ba2dfe187%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages