forked from ISTI-ansible-roles/ansible-roles
library/roles/vagrant: Also install virtualbox from the virtualbox.org repository.
This commit is contained in:
parent
45e8cb392c
commit
2390e8d31f
|
@ -3,8 +3,9 @@ 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'
|
||||
virtualbox_version: 5.0
|
||||
|
||||
vagrant_package_list:
|
||||
- 'linux-headers-{{ ansible_kernel }}'
|
||||
- vagrant
|
||||
- virtualbox
|
||||
- 'virtualbox-{{ virtualbox_version }}'
|
||||
|
||||
|
|
|
@ -1,15 +1,26 @@
|
|||
---
|
||||
- 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
|
||||
tags: [ 'vagrant', 'virtualbox' ]
|
||||
|
||||
- name: Install the virtualbox repository key
|
||||
apt_key: url=https://www.virtualbox.org/download/oracle_vbox.asc state=present
|
||||
when: vagrant_package_from_site
|
||||
tags: [ 'vagrant', 'virtualbox' ]
|
||||
|
||||
- name: Install the virtualbox repository
|
||||
apt_repository: repo='deb http://download.virtualbox.org/virtualbox/debian {{ ansible_distribution_release }} contrib' state=present update_cache=yes
|
||||
when: vagrant_package_from_site
|
||||
tags: [ 'vagrant', 'virtualbox' ]
|
||||
|
||||
- name: Install the virtualbox package and vagrant requirements
|
||||
apt: name={{ item }} state={{ pkg_state }}
|
||||
with_items: vagrant_package_list
|
||||
tags: [ 'vagrant', 'virtualbox' ]
|
||||
|
||||
- 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
|
||||
tags: [ 'vagrant', 'virtualbox' ]
|
||||
|
||||
|
|
Loading…
Reference in New Issue