Help us understand the problem. What is going on with this article?

VirtualBoxをインストールするplaybook(Debian)

More than 3 years have passed since last update.

ansibleの勉強がてら、Debian系のLinuxでVirtualBoxをインストールするplaybookを作ってみた。
試した環境はLinux Mintだけど、Debian系のLinuxなら使えるはず。

virtualbox.yml
---
- hosts: 127.0.0.1
  user: USER
  sudo: yes
  tasks:
    - name: add key
      apt_key: url='https://www.virtualbox.org/download/oracle_vbox.asc'

    - name: add repository
      apt_repository: repo='deb http://download.virtualbox.org/virtualbox/debian vivid contrib'

    - name: install package
      apt: name='virtualbox-5.0' state=latest

参考:
https://www.virtualbox.org/wiki/Linux_Downloads
http://docs.ansible.com/ansible/apt_key_module.html
http://docs.ansible.com/ansible/apt_repository_module.html
http://docs.ansible.com/ansible/apt_module.html

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away