---

- name: Install git
  apt:
    name: git
    state: latest

- name: Memorize hub version
  shell: "hub --version | grep hub | cut -d' ' -f3"
  register: hub_installed_version
  ignore_errors: True

- block:
  - name: Download hub
    get_url: url={{hub_url}} dest=/tmp

  - name: Extract hub
    unarchive: src=/tmp/{{hub_archive}} dest=/tmp

  - name: Install hub
    command: /tmp/{{hub_folder}}/install

  when:
    - hub_installed_version|succeeded
    - hub_installed_version.stdout|version_compare(hub_version, '<')

---

- name: Install git
  apt:
    name: git
    state: latest

- name: Memorize hub version
  shell: "hub --version | grep hub | cut -d' ' -f3"
  register: hub_installed_version
  ignore_errors: True

- block:
  - name: Download hub
    get_url: url={{hub_url}} dest=/tmp

  - name: Extract hub
    unarchive: src=/tmp/{{hub_archive}} dest=/tmp

  - name: Install hub
    command: /tmp/{{hub_folder}}/install

  when:
    - hub_installed_version is succeeded
    - hub_installed_version.stdout is version_compare(hub_version, '<')

Fix warnings on latest ansible
Fix warnings on latest ansible
