Re:Why Vagrant?
by xmonkee on Sunday December 01, 2013 @01:20AM
(#6826361)
Is there any way to automatically generate a provisioning script based on what was installed on the guest machine? For example, I do "vagrant ssh" and then install my whole development environment and it creates a script to do it every time based on what changed?
[ Parent
| on HN ]
Look at blueprint: https://github.com/devstructure/blueprint/
Right now it has frontends for bcfg2, cfengine, chef, puppet and shell scripts. It's not perfect, but it does a pretty good job of giving you a base set of provisioning rules you can then refine by hand.
Not within Vagrant itself. This is really the realm of configuration management tools. As far as I know, no tools do this reverse engineering because it is a fundamentally very difficult problem, but many of the config mgmt tools make it very easy to translate shell commands to rudimentary scripts for their systems.
Vagrant doesn't, but blueprint[0] seems to be a decent tool for generating puppet manifests. I haven't used it personally, but an Ops guy at work has had some success with it.
Puppet has some limited support for generating manifests based on the state of an existing system:
http://docs.puppetlabs.com/man/resource.html