Skip to content

Instantly share code, notes, and snippets.

@gad0lin
Created December 14, 2015 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gad0lin/5c7b934d6fe772a7741a to your computer and use it in GitHub Desktop.
Save gad0lin/5c7b934d6fe772a7741a to your computer and use it in GitHub Desktop.
- shell: curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python
when: "{{ pip_version.stdout| ge_version('7.0.0') }} == False"
def ge_version(given, minimum_required):
if given == "":
return False
def versiontuple(v):
return tuple(map(int, (v.split("."))))
return versiontuple(given) >= versiontuple(minimum_required)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment