---
# Provisioning a dev box

- name: Configuring Base System
  hosts: local
  sudo: yes
  sudo_user: vagrant
  tasks:
    - name: Checkout dotfiles
      git: repo=git://github.com/scorpionresponse/dotfiles.git dest=/home/vagrant/dotfiles accept_hostkey=True

    - name: Make install script executable
      shell: chmod +x /home/vagrant/dotfiles/install_dotfiles.sh

    - name: Install dotfiles
      command: /home/vagrant/dotfiles/install_dotfiles.sh
      args:
        chdir: /home/vagrant/dotfiles/
        executable: /bin/bash

    - name: apt-get install stuff 
      apt: pkg={{ item }} state=installed update_cache=true
      sudo_user: root
      with_items:
        - build-essential
        - cabal-install
        - python3
        - python3-pip
        - python3-setuptools

    - name: Cabal update and Shellcheck
      shell: cabal update && cabal install shellcheck

    - name: pip install stuff
      pip: name={{ item }} executable=pip3
      sudo_user: root
      with_items:
        - flask
        - requests 

---
# Provisioning a dev box

- name: Configuring Base System
  hosts: local
  sudo: yes
  sudo_user: vagrant
  tasks:
    - name: Checkout dotfiles
      git: repo=git://github.com/scorpionresponse/dotfiles.git dest=/home/vagrant/dotfiles accept_hostkey=True

    - name: Make install script executable
      shell: chmod +x /home/vagrant/dotfiles/install_dotfiles.sh

    - name: Install dotfiles
      shell: /home/vagrant/dotfiles/install_dotfiles.sh

    - name: apt-get install stuff 
      apt: pkg={{ item }} state=installed update_cache=true
      sudo_user: root
      with_items:
        - build-essential
        - cabal-install
        - python3
        - python3-pip
        - python3-setuptools

    - name: Cabal update and Shellcheck
      shell: cabal update && cabal install shellcheck

    - name: pip install stuff
      pip: name={{ item }} executable=pip3
      sudo_user: root
      with_items:
        - flask
        - requests 

Use shell to call dotfiles install script
Use shell to call dotfiles install script
