---
  - name: playbook to set the MDC
    hosts: local
    connection: local
    vars:
      local_path: "{{ lookup('env', 'HOME') }}"
      anaconda_path: "{{ local_path }}/anaconda"
      mdc_path: "{{ local_path }}/git/mdc"

    tasks:

      # - name: apt-get installs
      #   apt:
      #     name: "{{ item }}"
      #     state: present
      #   become: true
      #   with_items:
      #     - bzip2
      #     - g++
      #     - libgfortran3
      #     - liblapack3

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

      - 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: clone MDC
        git:
          repo: https://github.com/usnistgov/mdcs.git
          dest: "{{ mdc_path }}"
          version: master

---
  - name: playbook to set the MDC
    hosts: local
    connection: local
    vars:
      local_path: "{{ lookup('env', 'HOME') }}"
      anaconda_path: "{{ local_path }}/anaconda"
      mdc_path: "{{ local_path }}/git/mdc"

    tasks:

      - name: apt-get installs
        apt:
          name: "{{ item }}"
          state: present
        become: true
        with_items:
          - bzip2
      #     - g++
      #     - libgfortran3
      #     - liblapack3

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

      - 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: clone MDC
        git:
          repo: https://github.com/usnistgov/mdcs.git
          dest: "{{ mdc_path }}"
          version: master

Add bzip2 to installation as it is required
Add bzip2 to installation as it is required
