lab:ansible_virtualbox_autoboot_linux:install_oracle_virtualbox_using_ansible
This is an old revision of the document!
Install Oracle VirtualBox using Ansible
- Log in to your host machine; we will start in your home directory
- no longer as user ansible
- Create the file install-virtualbox.yml
- install-virtualbox.yml
--- - hosts: localhost connection: local become: true tasks: - name: Add Oracle apt key apt_key: url: https://www.virtualbox.org/download/oracle_vbox_2016.asc state: present - name: Add Virtualbox repo apt_repository: repo: "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian {{ ansible_distribution_release }} contrib" state: present - name: Install Virtualbox apt: pkg: - virtualbox state: present update_cache: true - name: Ensure vboxdrv kernel module is loaded (optional) modprobe: name: vboxdrv state: present
- Run the playbook you just created
ansible-playbook install-virtualbox.yml –ask-become-pass
Next Step
You now have Virtualbox installed! Proceed to Customize user-data for Ubuntu unattended install
Or back to Install packages and create keys for Ansible management
lab/ansible_virtualbox_autoboot_linux/install_oracle_virtualbox_using_ansible.1705721095.txt.gz · Last modified: 2024/01/20 03:24 by user