Giter Club home page Giter Club logo

ansible-pip's People

Contributors

alexandermeindl avatar antonbormotov avatar binary-data avatar bobbyrenwick avatar cognifloyd avatar conorsch avatar gmacon avatar jschaul avatar michalgasek avatar nmusatti avatar pgilad avatar zialus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ansible-pip's Issues

Support for Python 3

Currently, it installs pip for Python 2.x โ€” would be great to have the option of installing it for 3. I just hacked the source to change the binary but a variable would be good to add.

bobbyrenwick.pip is fully broken: The error was: error while evaluating conditional (pip_latest_output.stdout.find('Requirement already up-to-date') == -1): 'dict object' has no attribute 'stdout'"}

This happens on OS X and Ubuntu too, I tried to install this role using this:

dependencies:
    - role: bobbyrenwick.pip
      python: python
      pip: pip
    - role: bobbyrenwick.pip
      python: python3
      pip: pip3

Errors:

00:00:02.466 TASK [bobbyrenwick.pip : Upgrade to latest version of pip.] ********************
00:00:02.523 fatal: [localhost]: FAILED! => {"failed": true, "msg": "The conditional check 'pip_latest_output.stdout.find('Requirement already up-to-date') == -1' failed. The error was: error while evaluating conditional (pip_latest_output.stdout.find('Requirement already up-to-date') == -1): 'dict object' has no attribute 'stdout'"}
00:00:02.524 

The code of the failing task:

- name: Upgrade to latest version of pip.
  command: "{{ pip }} install -U pip"
  register: pip_latest_output
  become: yes
  changed_when: pip_latest_output.stdout.find('Requirement already up-to-date') == -1
  when: pip_version == None or pip_version == "LATEST"

Is this repo maintained?

Just wondering, is this repo maintained? I use this role and it works fine. But I see pull requests that definitely worth to be merged (not critical, but...) and issue that can be closed already.

License?

What license is this under? Could you you release it under Apache 2.0?
I'd like to include it in a playbook repo that includes multiple roles, and I got push back when I tried to use an external requirement from galaxy. If I can include this there (with proper credits) that would be fantastic.

Testing strategy

I have a couple of concerns about how this role is tested:

  • Does it make sense to test distros that have been retired? I'm thinking of CentOS 6 and Fedora 31. Should we remove them from the text matrix?
  • As it is we are only testing system Python installations, but we do not test custom installed ones. This results in poor Python version coverage and leaves mostly untested the use of get-pip.py. Should we consider adding tests for source installations?

Improve support for old Python versions

Python versions before 3.6 are not supported by pip anymore, but specific versions of the get-pip.py script are provided that make it possible to install the latest supporting version. These should be used when running ansible-pip against an old Python version.
Additionally, for these Python releases latest should really mean latest supporting pip version and this role's behaviour should reflect that.

Is this role maintained?

Is this role still maintained? Is any of the maintainer willing to review and apply pull request #31, or if anyone is willing to step up, can they be added as maintainers, both on GitHub and on Galaxy?

ImportError: cannot import name IncompleteRead

Greetings. In an attempt to ensure pip is installed (see angstwad/docker.ubuntu#28), I did a quick playbook:

---
- hosts: staging
  roles:
    - bobbyrenwick.pip
    - angstwad.docker_ubuntu

Several tasks are being skipped (unsure why):

``
`
TASK: [bobbyrenwick.pip | check to see if pip is already installed] ***********
changed: [staging.foobar.com]

TASK: [bobbyrenwick.pip | download pip] ***************************************
skipping: [staging.foobar.com]

TASK: [bobbyrenwick.pip | install pip] ****************************************
skipping: [staging.foobar.com]

TASK: [bobbyrenwick.pip | delete get-pip.py] **********************************
skipping: [staging.foobar.com]

TASK: [bobbyrenwick.pip | check to see if pip is installed at the correct version] ***
skipping: [staging.foobar.com]

TASK: [bobbyrenwick.pip | install required version of pip] ********************
skipping: [staging.foobar.com]


I'm then getting the following error:

TASK: [angstwad.docker_ubuntu | Install Docker-py] ****************************
failed: [staging.foobar.com] => {"cmd": "/usr/bin/pip install docker-py", "failed": true}
msg:
:stderr: Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.7/dist-packages/pip/init.py", line 11, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in
from pip.download import path_to_url
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead


I ssh'ed into the remote instance (Ubuntu 14.04.1) and did a quick n dirty `easy_install pip`. I'm no longer getting the error message when replaying the playbook.

I hope I'm not missing the obvious - I just started with Ansible and still learning. I can provide more information if needed. Thanks!

New Pip 10 breaks deployments

Hi, 6 hours ago PyPA released pip10 and currently this role breaks the deployments.

If I try to instal pip10 I get such error:

TASK [bobbyrenwick.pip : Upgrade to latest version of pip.] ********************
Saturday 14 April 2018  17:03:45 +0000 (0:00:00.029)       0:01:04.226 ******** 
fatal: [i_019e5b99c1f1fde37]: FAILED! => {"msg": "The conditional check 'pip_latest_output.stdout.find('Requirement already up-to-date') == -1' failed. The error was: error while evaluating conditional (pip_latest_output.stdout.find('Requirement already up-to-date') == -1): 'dict object' has no attribute 'stdout'"}

If I try to install pip9.0.3 I get another error:

TASK [bobbyrenwick.pip : Install required version of pip.] *********************
Saturday 14 April 2018  17:49:25 +0000 (0:00:00.163)       0:01:01.882 ******** 
fatal: [i_09c5d3ce100839b1b]: FAILED! => {"changed": false, "cmd": "pip install pip==9.0.3", "msg": "[Errno 2] No such file or directory", "rc": 2}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.