---
- name: Install fileschanged for the watcher service
  apt: name={{ item }} update_cache=yes
  with_items:
  - fileschanged
  sudo: yes

- name: Fix the permissions of the site destination folder
  file: path=/vagrant_data/_site state=directory owner=vagrant group=vagrant recurse=yes

- name: Install the dev Jekyll configuration
  copy: src=_config.yml dest=/vagrant_data/src/site_source/_config.yml
        owner=vagrant group=vagrant mode=0644

- name: Kick off an initial build
  shell: ./build_site.sh chdir=/vagrant_data
  sudo: yes
  sudo_user: vagrant

- name: Install the watcher's init script
  template: src=watcher.conf.j2 dest=/etc/init/watcher.conf
  sudo: yes

- name: Ensure that the watcher has started
  service: name=watcher state=started

---
- name: Install apt packages
  apt: name={{ item }} update_cache=yes
  with_items:
  - fileschanged
  - mongodb
  sudo: yes

- name: Fix the permissions of the site destination folder
  file: path=/vagrant_data/_site state=directory owner=vagrant group=vagrant recurse=yes

- name: Install the dev Jekyll configuration
  copy: src=_config.yml dest=/vagrant_data/src/site_source/_config.yml
        owner=vagrant group=vagrant mode=0644

- name: Kick off an initial build
  shell: ./build_site.sh chdir=/vagrant_data
  sudo: yes
  sudo_user: vagrant

- name: Install the watcher's init script
  template: src=watcher.conf.j2 dest=/etc/init/watcher.conf
  sudo: yes

- name: Ensure that the watcher has started
  service: name=watcher state=started

Install mongodb locally in dev.
Install mongodb locally in dev.
