library/roles: Basic role to install vagrant from the vagrant site.

This commit is contained in:
Andrea Dell'Amico 2015-08-12 19:36:38 +02:00
parent 91b75f4697
commit fb2fcc6084
2 changed files with 25 additions and 0 deletions

10
vagrant/defaults/main.yml Normal file
View File

@ -0,0 +1,10 @@
---
vagrant_install: False
vagrant_package_from_site: False
vagrant_site_version: 1.7.4
vagrant_url: 'https://dl.bintray.com/mitchellh/vagrant/vagrant_{{ vagrant_site_version }}_x86_64.deb'
vagrant_package_list:
- 'linux-headers-{{ ansible_kernel }}'
- vagrant
- virtualbox

15
vagrant/tasks/main.yml Normal file
View File

@ -0,0 +1,15 @@
---
- name: Install the vagrant packages and requirements
apt: name={{ item }} state={{ pkg_state }}
with_items: vagrant_package_list
tags: vagrant
- name: Get the package from the vagrant site
get_url: url='{{ vagrant_url }}' dest=/opt/vagrant_{{ vagrant_site_version }}_x86_64.deb
when: vagrant_package_from_site
tags: vagrant
- name: Install the package from the vagrant site
apt: deb=/opt/vagrant_{{ vagrant_site_version }}_x86_64.deb
when: vagrant_package_from_site
tags: vagrant