Repository URL to install this package:
|
Version:
1.0.0b1 ▾
|
---
- name: add oracle virtualbox repository key
apt_key:
url: https://www.virtualbox.org/download/oracle_vbox_2016.asc
state: present
register: oracle_key_result
become: yes
when: use_virtualbox_oracle_repo or ansible_distribution == 'Debian'
# Update APT configuration
- name: add oracle virtualbox repository
apt_repository: >
repo="deb http://download.virtualbox.org/virtualbox/debian {{ ansible_distribution_release }} contrib"
state=present
register: backports_result
become: yes
when: use_virtualbox_oracle_repo or ansible_distribution == 'Debian'
# Download keys and package lists
- name: apt-get update
apt: update_cache=yes cache_valid_time=0
become: yes
when: (use_virtualbox_oracle_repo or ansible_distribution == 'Debian') and (backports_result.changed or oracle_key_result.changed)
- name: apt-get update
apt: update_cache=true cache_valid_time=3600
become: yes
- name: install virtualbox
apt:
name: "{{ package_name_debian }}"
become: true
when: ansible_distribution == 'Debian'
- name: install virtualbox
apt:
name: "{{ package_name_ubuntu }}"
become: true
when: ansible_distribution == 'Ubuntu'