# Ansible playbook for ubuntu-like dev environments.
# Pulls and install my dotfiles, and installs some other tools.
---
- hosts: all
  tasks:
    - name: apt-get dependencies for rest of playbook
      apt: name={{item}}
      with_items:
          - git
      sudo: yes

    - name: git force pull latest dotfiles
      git:
       repo="https://github.com/mattduck/dotfiles.git"
       dest="~/dotfiles"
       recursive=yes
       force=yes
       update=yes

    - name: source dotfiles in bashrc
      lineinfile:
        dest="~/.bashrc"
        line="source $HOME/dotfiles/activate.sh"
        create=yes
        backup=yes

    - name: run dotfiles install script
      shell: 'export DOTFILES="$HOME/dotfiles" && $DOTFILES/bin/,dotfiles-install'

    - name: add tmux ppa to apt repositories
      apt_repository: repo="ppa:pi-rho/dev"
      sudo: yes

    - name: clone and install fasd
      shell: 'git clone https://github.com/clvv/fasd.git /tmp/fasd &&
              cd /tmp/fasd &&
              make install'
      args:
          creates:
              /usr/local/bin/fasd
      sudo: yes

    - name: update apt cache
      apt: update_cache=yes
      sudo: yes

    - name: apt-get install useful tools
      apt: name={{item}}
      with_items:
          - tmux
          - vim
          - tree
      sudo: yes

    - name: pip install useful tools
      pip: name=ipython
      sudo: yes

# Ansible playbook for ubuntu-like dev environments.
# Pulls and install my dotfiles, and installs some other tools.
---
- hosts: all
  tasks:
    - name: apt-get dependencies for rest of playbook
      apt: name={{item}}
      with_items:
          - git
      sudo: yes

    - name: git force pull latest dotfiles
      git:
       repo="https://github.com/mattduck/dotfiles.git"
       dest="~/dotfiles"
       recursive=yes
       force=yes
       update=yes

    - name: source dotfiles in bashrc
      lineinfile:
        dest="~/.bashrc"
        line="source $HOME/dotfiles/activate.sh"
        create=yes
        backup=yes

    - name: run dotfiles install script
      shell: 'export DOTFILES="$HOME/dotfiles" && $DOTFILES/bin/,dotfiles-install'

    - name: add tmux ppa to apt repositories
      apt_repository: repo="ppa:pi-rho/dev"
      sudo: yes

    - name: clone and install fasd
      shell: 'git clone https://github.com/clvv/fasd.git /tmp/fasd &&
              cd /tmp/fasd &&
              make install'
      args:
          creates:
              /usr/local/bin/fasd
      sudo: yes

    - name: update apt cache
      apt: update_cache=yes
      sudo: yes

    - name: apt-get install useful tools
      apt: name={{item}}
      with_items:
          - tmux
          - vim
          - tree
          - ngrok-client
      sudo: yes

    - name: pip install useful tools
      pip: name=ipython
      sudo: yes

Add ngrok client to ubuntu playbook
Add ngrok client to ubuntu playbook
