fideloper/Vaprobash — pull request #59 by trq (2014-01-14 22:21:25+00:00)
Title: Initial refactor into the start of something more modular.

Ok... I'm just putting this out there to see if I can get some feedback on the idea. I'm not sure if you want to go this kind of direction with this project or not. If you don't thats cool, I'll likely continue it anyway.

This PR basically lays the groundwork for a more in depth / flexible framework for enabling / disabling packages.

Provided is a simple cli called ./vpb

Each package has been split out into its own directory. To enable a package, it is simply symlinked into the .vpb/enabled directory.

In the future, I envision a *configure* prompt (walkthrough) appearing as a package is enabled. Enabling packages to be easily configured. This will likely be achieved by breaking the packages into separate functions, eg; configure, pre_install, install and post_install. This has not been implemented in this PR.

The idea is to keep the packages as simple as possible, and to palm off more complex tasks to the framework.

I also understand that some users may prefer the current "uncomment this" type of setup. This can still be provided alongside this PR, and in fact, this PR will (currently) handle a pre_provision.sh script which could look something like:

```
# enable foo
./vpb enable foo
# enable bar
# ./vpb enable bar
# enable bob
# ./vpb enable bob
# enable ben
./vpb enable ben
```
This would simply enable each package just prior to provisioning.

By providing this basic structure we also open the doors to abstracting particular functionality into the framework which eventually could lead to the tool being useful across OS or distribution.

Anyway, just hoping for some feedback. I'd be happy for this PR to sit here for a while or maybe even be merged into a long running feature branch of some sort. Its still very rough around the edges and hasn't been extensivly tested.

Feedback much appreciated.