- name: install pip on Debian
  block:
    - name: install pip using apt
      apt: name=python-pip state=present
  when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: install pip on Mac
  block:
    - name: create temporary folder
      file:
        path: ../../.tmp
        state: directory
    - name: get pip installer using curl
      get_url: 
        url: https://bootstrap.pypa.io/get-pip.py
        dest: ../../.tmp/get-pip.py
    - name: install pip
      shell: python ../../.tmp/get-pip.py
  when: ansible_distribution == 'MacOSX'
  always: 
    - name: remove pip installer script
      file: 
        path: ../../.tmp/get-pip.py
        state: absent

- name: install docker
  pip: name=docker

- name: Install yarn with npm
  npm:
    name: yarn
    global: yes

- name: Install docker compose
  pip: name=docker-compose
