saltstack/salt — pull request #15175 by rominf (2014-08-22 13:58:28+00:00)
Title:  Modules for installing VirtualBox Guest Additions

Modules use the CD, connected by VirtualBox.

CLI Example:

.. code-block:: bash

salt '*' virtualbox.guest_additions_install

It automatically upgrades system (VirtualBox guide recommends). It's possible to disable it and enable reboot after installation.

Allows to remove additions also. They can be removed used script in installation script or in case it was deleted from the CD.

Unfortunately I didn't find the way to determine VirtualBox version from the guest OS. If I could, I would write function to download iso image from the internet.

I'm not sure of name of the modules. I called them `virtualbox` in assumption that someone will write other functions to manage VirtualBox on host machine. On the other hand, VirtualBox guest and host modules, IMHO, wouldn't share the code, so it's possible to create 2 modules: `virtualbox_guest` and `virtualbox_host` to have functions like: `virtualbox_guest.additions_install`, `virtualbox_guest.add_shared_folder_user`, etc.

I didn't write the tests, sorry. I'll read about testing infrastructure in Salt little bit later. I think writing tests should be straightforward.