Hi Brian,
Brian Cain writes: > Thanks for taking a look at the action triggers! ;-) Thank you for your remarks. > Benjamin Riefenstahl <[email protected]> wrote: > So to quote some code, we are doing this: > > config.vm.define opts[:name] do |host| > # ... > host.vm.provision :trigger, run: "always" do |trigger| > trigger.fire do > run "vagrant ssh #{opts[:name]} -- -f -R 10000:proxy:8080 -N" > end > end > > With 2.2.4, a direct translation of this would be something like > > host.trigger.before :all do |trigger| > trigger.run = {inline: "vagrant ssh #{opts[:name]} -- -f -R > 10000:proxy:8080 -N"} > end > > Ah ok, so actually what you have written here is a trigger that will > run before a given guest runs any command, which I don't think is > exactly the same. Obviously. > You are correct in thinking that Vagrant::Action::Builtin::Provision > would be the right action to run before the provision > step. Unfortunately that action does not work exactly how you would > expect it to work. It actually runs very early in the vagrant life > cycle and returns early before actually running any provision > steps. So even if you get the trigger working, it would run before you > expected it to. Is that usefull? > We have plans of adding a basic Provision action "stub" so that you > can do exactly what you are wishing to here, but we haven't got there > yet. Ok. > That being said! For now you should be ok attaching your trigger to > another action, perhaps? Which would that be? To restate the requirements of the scenario (itself not written in stone, of course ;-)), it would have to run after the machine is created, but before it is actually provisioned. Thanks, benny -- mecom Medien-Communikations-Gesellschaft mbH Mittelweg 143, D 20148 Hamburg Tel: +49 40 411332 801 Fax: +49 40 451962 http://www.mecom.de Registergericht Hamburg, HRB 43177 Geschäftsführung: Barbara Bliefert, Norbert Schmidt-Banasch -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/86mujhy23u.fsf%40riefenstahl3.mecom.de. For more options, visit https://groups.google.com/d/optout.
