---
  - name: playbook to set up FiPy
    hosts: local
    connection: local
    vars:
      local_home: "{{ lookup('env', 'HOME') }}"
      anaconda_path: "{{ local_home }}/anaconda"
      fipy_path: "{{ local_home}}/git/fipy "

    tasks:

      - name: download miniconda
        get_url: url=https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh dest=/tmp

      - name: install miniconda
        shell: bash /tmp/Miniconda-latest-Linux-x86_64.sh -b -p {{ anaconda_path }}
        args:
          creates: "{{ anaconda_path }}"

      - name: update conda
        shell: "{{ anaconda_path }}/bin/conda update conda"

      - name: install fipy requirements
        shell: "{{ anaconda_path }}/bin/conda install {{ item }}"
        with_items:
          - numpy==1.9
          - scipy
          - pip

      - name: install fipy requirements guyer channel
        shell: "{{ anaconda_path }}/bin/conda install --channel  {{ item }}"
        with_items:
          - gmsh

      - name: install scikit-learn
        pip: name==scikit-fmm

      - name: clone fipy
        git:
          repo: https://github.com/usnistgov/fipy.git
          dest: "{{ fipy_dir }}"
          version: develop

---
  - name: playbook to set up FiPy
    hosts: local
    connection: local
    vars:
      local_home: "{{ lookup('env', 'HOME') }}"
      anaconda_path: "{{ local_home }}/anaconda"
      fipy_path: "{{ local_home}}/git/fipy "

    tasks:

      - name: download miniconda
        get_url: url=https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh dest=/tmp

      - name: install bzip2
        apt: name=bzip2 state=present

      - name: install miniconda
        shell: bash /tmp/Miniconda-latest-Linux-x86_64.sh -b -p {{ anaconda_path }}
        args:
          creates: "{{ anaconda_path }}"

      - name: update conda
        shell: "{{ anaconda_path }}/bin/conda update conda"

      - name: install fipy requirements
        shell: "{{ anaconda_path }}/bin/conda install {{ item }}"
        with_items:
          - numpy==1.9
          - scipy
          - pip

      - name: install fipy requirements guyer channel
        shell: "{{ anaconda_path }}/bin/conda install --channel  {{ item }}"
        with_items:
          - gmsh

      - name: install scikit-learn
        pip: name==scikit-fmm

      - name: clone fipy
        git:
          repo: https://github.com/usnistgov/fipy.git
          dest: "{{ fipy_dir }}"
          version: develop

Add bzip2 installation for anaconda
Add bzip2 installation for anaconda
