---

- name: Install build dependencies
  apt:
    name: "{{ item }}"
  become: yes
  with_items:
    - git
    - build-essential
    - python-dev
    - python-tk
    - tcl8.6-dev
    - tk8.6-dev
    - libffi-dev
    - libssl-dev

- name: Download
  git:
    repo: "https://github.com/girder/girder.git"
    dest: "{{ girder_path }}"
    version: "{{ girder_version }}"
    update: yes
    force: yes
  register: result

- name: Install Python package
  pip:
    name: "{{ girder_path }}"
#    editable: true
    # TODO: The 'editable' option is broken until Ansible 2.4
    # See: https://github.com/ansible/ansible/pull/19688
    extra_args: '-e'
    virtualenv: "{{ python_dist_path }}"
  when: result.changed
  notify:
    - Restart Girder
    - Build Girder

- name: Deploy config file
  template:
    src: "girder.local.cfg.j2"
    dest: "{{ girder_path }}/girder/conf/girder.local.cfg"
  notify: Restart Girder

---

- name: Install build dependencies
  apt:
    name: "{{ item }}"
  become: yes
  with_items:
    - curl
    - git
    - libffi-dev
    - build-essential
    - libgif-dev
    - libjpeg-dev
    - libssl-dev
    - zlib1g-dev

- name: Download
  git:
    repo: "https://github.com/girder/girder.git"
    dest: "{{ girder_path }}"
    version: "{{ girder_version }}"
    update: yes
    force: yes
  register: result

- name: Install Python package
  pip:
    name: "{{ girder_path }}"
#    editable: true
    # TODO: The 'editable' option is broken until Ansible 2.4
    # See: https://github.com/ansible/ansible/pull/19688
    extra_args: '-e'
    virtualenv: "{{ python_dist_path }}"
  when: result.changed
  notify:
    - Restart Girder
    - Build Girder

- name: Deploy config file
  template:
    src: "girder.local.cfg.j2"
    dest: "{{ girder_path }}/girder/conf/girder.local.cfg"
  notify: Restart Girder

Update the girder role system dependencies
Update the girder role system dependencies
