---
# bootstrap vms on host machine

# install required system packages
- name: install system packages
  apt:
    state: present
    name: "{{item}}"
    update_cache: yes
  with_items: []

# copy across vagrant file
- name: create target folder
  file:
    state: directory
    dest: "{{ vagrant_folder }}"

- name: copy vagrant file
  template:
    src: Vagrantfile.j2
    dest: "{{ vagrant_folder }}/Vagrantfile"

# update and run vagrant boxes
- name: update vagrant box
  command: vagrant box update
  args:
    chdir: "{{vagrant_folder}}"

- name: vagrant up
  command: vagrant up
  args:
    chdir: "{{vagrant_folder}}"
