- name: Clone client from GitHub
  git: repo=https://github.com/openchemistry/mongochemclient.git version=master dest=/opt/mongochem/client
  tags: mongochem

- name: Run npm install for client
  npm: path=/opt/mongochem/client
  tags: mongochem

- name: Build the client HTML5 code
  command: npm run build chdir=/opt/mongochem/client
  tags: mongochem

- name: Clone server from GitHub
  git: repo=https://github.com/openchemistry/mongochemserver.git version=master dest=/opt/mongochem/server
  tags: mongochem

- name: Install required python packages
  pip:
    virtualenv: "{{ mongochem_virtualenv_dir }}"
    virtualenv_python: python3.5
    requirements: /opt/mongochem/server/requirements.txt
  tags: mongochem

- name: Install java ( needed for 3DMol build! )
  become: yes
  become_user: root
  apt: name={{ item }} state=present
  with_items:
    - default-jre
  tags: mongochem

- name: Clone client from GitHub
  git: repo=https://github.com/openchemistry/mongochemclient.git version=master dest=/opt/mongochem/client
  tags: mongochem

- name: Run npm install for client
  npm: path=/opt/mongochem/client
  tags: mongochem

- name: Build the client HTML5 code
  command: npm run build chdir=/opt/mongochem/client
  tags: mongochem

- name: Clone server from GitHub
  git: repo=https://github.com/openchemistry/mongochemserver.git version=master dest=/opt/mongochem/server
  tags: mongochem

- name: Install required python packages
  pip:
    virtualenv: "{{ mongochem_virtualenv_dir }}"
    virtualenv_python: python3.5
    requirements: /opt/mongochem/server/requirements.txt
  tags: mongochem

Install Java ( yes Java! ) for 3DMol build
Install Java ( yes Java! ) for 3DMol build
