emyl / vagrant-triggers

Allow the definition of arbitrary scripts that will run on the host before and/or after Vagrant commands.
MIT License
546 stars 35 forks source link

Added target option #1

Closed alekitto closed 10 years ago

alekitto commented 10 years ago

Added :target option to select the target of the command (host or guest) If not specified defaults to "host" in order to mantain BC.

emyl commented 10 years ago

Although I appreciate your effort I'm very doubtful about this request.

Do you have an use case for running commands on the guest which is not covered by provisioning?

alekitto commented 10 years ago

I needed to execute commands every time the VM boots up, after the system was fully started and the synced folders are mounted, but i don't want to re execute the provision task every time i need to start an instance. In particular I needed to mount a ramfs folder in a NFS subdir, touch a file into that folder and restart a service just after up command completes. With provisioning i need minutes before my VM is up and ready; in this way i must wait just few seconds...

emyl commented 10 years ago

I think this plugin is more suitable for you:

https://github.com/fgimenez/vagrant-shell-commander