---
- name: dependencies | Install system dependencies
  sudo: true
  apt:
    name: "{{ item }}"
    update_cache: yes
    state: present
  with_items:
    - git
    - python-dev
    - python-pip
    - realpath
  tags: [st2, dependencies]

- name: dependencies | Upgrade pip
  sudo: true
  pip:
    name: pip
    extra_args: "-U"

- name: dependencies | Install pip virtualenv
  sudo: true
  pip:
    name: virtualenv
  tags: [st2, dependencies]

- name: dependencies | Install st2 pip dependencies
  sudo: true
  pip:
    requirements: "https://raw.githubusercontent.com/StackStorm/st2/v{{ st2_version }}/requirements.txt"
  tags: [st2, dependencies]

---
- name: dependencies | Install system dependencies
  sudo: true
  apt:
    name: "{{ item }}"
    update_cache: yes
    state: present
  with_items:
    - git
    - python-dev
    - python-pip
    - realpath
  tags: [st2, dependencies]

- name: dependencies | Upgrade pip
  sudo: true
  pip:
    name: pip
    extra_args: "-U"

- name: dependencies | Install pip virtualenv
  sudo: true
  pip:
    name: virtualenv
  tags: [st2, dependencies]

- name: dependencies | Install st2 pip dependencies
  sudo: true
  pip:
    requirements: "https://downloads.stackstorm.net/releases/st2/{{ _st2_version }}/requirements.txt"
  tags: [st2, dependencies]

Use downloads not github for reqs
Use downloads not github for reqs
