# This file is subject to the terms and conditions defined in file 'LICENSE',
# which is part of this repository.
---
- hosts: localhost
  connection: local
  become: true

  tasks:
  - name: Install vagrant
    package:
      name: vagrant
      state: present

  - name: Add virtualbox repository
    apt_repository:
      repo: deb http://download.virtualbox.org/virtualbox/debian xenial contrib
      state: present

  - name: Add virtualrepository gpg key
    apt_key:
      url: https://www.virtualbox.org/download/oracle_vbox_2016.asc
      state: present

  - name: Install virtualbox
    package:
      name: virtualbox
      state: present

# This file is subject to the terms and conditions defined in file 'LICENSE',
# which is part of this repository.
---
- hosts: localhost
  connection: local
  become: true

  vars:
    vagrant_version: 1.9.5

  tasks:
  - name: Install vagrant
    apt:
      deb: "https://releases.hashicorp.com/vagrant/{{ vagrant_version }}/vagrant_{{ vagrant_version }}_x86_64.deb"
      state: present

  - name: Add virtualbox repository
    apt_repository:
      repo: deb http://download.virtualbox.org/virtualbox/debian xenial contrib
      state: present

  - name: Add virtualrepository gpg key
    apt_key:
      url: https://www.virtualbox.org/download/oracle_vbox_2016.asc
      state: present

  - name: Install virtualbox
    package:
      name: virtualbox
      state: present

Install vagrant from deb package
Install vagrant from deb package
