Skip to content

Commit

Permalink
Merge pull request #7 from conorsch/pretty-titles
Browse files Browse the repository at this point in the history
Reformats task names for readability
  • Loading branch information
Bob Renwick committed Oct 28, 2015
2 parents 004b422 + d81e3f5 commit dd97876
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@

# Causes an error if we try and which something that doesn't exist so use this
# as a workaround.
- name: check to see if pip is already installed
- name: Check to see if pip is already installed.
command: "{{ pip }} --version"
ignore_errors: true
changed_when: false
register: pip_is_installed
changed_when: false

- name: download pip
- name: Download pip.
get_url: url=https://bootstrap.pypa.io/get-pip.py dest={{ pip_download_dest }}
when: pip_is_installed.rc != 0

- name: install pip
- name: Install pip.
command: "{{ python }} {{ pip_download_dest }}/get-pip.py"
sudo: yes
when: pip_is_installed.rc != 0

- name: delete get-pip.py
- name: Delete get-pip.py.
file: state=absent path={{ pip_download_dest }}/get-pip.py
when: pip_is_installed.rc != 0

# $ pip --version
# pip 1.5.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
- name: check to see if pip is installed at the correct version
- name: Check to see if pip is installed at the correct version.
shell: "{{ pip }} --version | awk '{print $2}'"
register: pip_installed_version
changed_when: false
when: pip_version != None or pip_version != "LATEST"

- name: install required version of pip
- name: Install required version of pip.
command: "{{ pip }} install pip=={{ pip_version }}"
sudo: yes
when: pip_version != None and pip_installed_version.stdout != pip_version and pip_version != "LATEST"

- name: Upgrade to latest version of pip
- name: Upgrade to latest version of pip.
command: "{{ pip }} install -U pip"
register: pip_latest_output
sudo: yes
Expand Down

0 comments on commit dd97876

Please sign in to comment.