---

- hosts: all
  vars:
    girder_update: no
    girder_force: no
    girder_virtualenv: "{{ ansible_user_dir }}/.virtualenvs/girder"
    girder_always_build_assets: yes
  pre_tasks:
    - name: Update package cache
      apt:
        update_cache: yes
      become: yes
      become_user: root

  roles:
    - role: Stouts.mongodb
      become: yes
      become_user: root
    - role: girder

  post_tasks:
    - name: Install Grunt globally
      npm:
        name: "{{ item }}"
        global: yes
      with_items:
        - grunt
        - grunt-cli
      become: yes
      become_user: root
      when: "{{ girder_web }}"

    - name: Install Girder Python development requirements
      pip:
        requirements: "requirements-dev.txt"
        chdir: "{{ girder_path }}"
        virtualenv: "{{ girder_virtualenv }}"

    - name: Build Girder with development dependencies
      command: "npm install"
      args:
        chdir: "{{ girder_path }}"
      when: "{{ girder_web }}"

---

- hosts: all
  vars:
    girder_update: no
    girder_force: no
    girder_virtualenv: "{{ ansible_user_dir }}/.virtualenvs/girder"
    girder_always_build_assets: yes
  pre_tasks:
    - name: Update package cache
      apt:
        update_cache: yes
      become: yes
      become_user: root

  roles:
    - role: Stouts.mongodb
      become: yes
      become_user: root
    - role: girder

  post_tasks:
    - name: Install Grunt globally
      npm:
        name: "{{ item }}"
        global: yes
      with_items:
        - grunt
        - grunt-cli
      become: yes
      become_user: root
      when: "{{ girder_web }}"

    - name: Install Girder Python development requirements
      pip:
        requirements: "requirements-dev.txt"
        chdir: "{{ girder_path }}"
        virtualenv: "{{ girder_virtualenv }}"

    - name: Build Girder with development dependencies
      command: "npm install"
      args:
        chdir: "{{ girder_path }}"
      when: "{{ girder_web }}"

    - name: Install development packages
      apt:
        name: "{{ item }}"
        state: present
      with_items:
        - cmake
        - cmake-curses-gui
      become: yes
      become_user: root

Add cmake and ccmake packages to default Vagrant developer environment
Add cmake and ccmake packages to default Vagrant developer environment
