darkwizard242.virtualbox
Ansible Role: virtualbox
Role to install (by default) virtualbox-6.1 package for Debian based systems or uninstall (if passed as var).
Requirements
None.
Role Variables
Available variables are listed below (located in defaults/main.yml):
Variables list:
virtualbox_version: 7.0
virtualbox_app_name: virtualbox
virtualbox_desired_state: present
virtualbox_gpg_key: https://www.virtualbox.org/download/oracle_vbox_2016.asc
virtualbox_repo_debian: "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian {{ ansible_lsb['codename'] }} contrib"
virtualbox_repo_debian_filename: {{ virtualbox_app_name }}
Variables table:
| Variable | Description |
|---|---|
| virtualbox_version | Version of virtualbox to append to the virtualbox_app variable during the installation task. |
| virtualbox_app | Defines the app to install i.e. virtualbox |
| virtualbox_desired_state | Defined to dynamically set whether to install (i.e. either present or latest) or uninstall (i.e. absent) the package. Defaults to present |
| virtualbox_gpg_key | GPG key for Virtualbox |
| virtualbox_repo_desired_state | State for repo to download Virtualbox from. Can either be 'present' or 'absent'. |
| virtualbox_repo_debian | Virtualbox's repo link for Debian based systems. |
| virtualbox_repo_debian_filename | Name of file to save for virtualbox's repo in /etc/apt/sources.list.d/ |
Dependencies
None
Example Playbook
For default behaviour of role (i.e. installation of virtualbox-6.1 package) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.virtualbox
For customizing behavior of role (i.e. installation of latest virtualbox-6.1 package) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.virtualbox
vars:
virtualbox_desired_state: latest
For customizing behavior of role (i.e. un-installation of virtualbox-6.1 package) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.virtualbox
vars:
virtualbox_desired_state: absent
License
Author Information
This role was created by Ali Muhammad.
About
Virtualbox installation or uninstallation in Debian based systems with amd64 architecture.
Install
ansible-galaxy install darkwizard242.virtualboxLicense
mit
Downloads
4.9k
Owner
Senior DevOps/CloudOps Engineer.
Dedicated to Automating everything I come across.
Love to work on and learn new technologies/tools everyday!
