Skip to content
This repository has been archived by the owner on Jul 29, 2018. It is now read-only.

Another example to add please #21

Closed
kalefranz opened this issue Aug 6, 2014 · 8 comments
Closed

Another example to add please #21

kalefranz opened this issue Aug 6, 2014 · 8 comments
Milestone

Comments

@kalefranz
Copy link

Hi @emyl . Thanks for the awesome plugin. It's really very helpful.

I'm not a Ruby guy, so like a lot of other people here, examples are good. In my specific situation, writing a config.trigger.before :provision block only triggers when I run vagrant provision. I'd really like that block to hit when I run any of

  • vagrant provision
  • vagrant up --provision
  • the first vagrant up when the provision step us run
  • if any config.vm.provision block is set to run: "always"

Is there something straight-forward I can do to make this happen?

@emyl
Copy link
Owner

emyl commented Aug 6, 2014

Hi!

That's an interesting use case! Let me think a moment how it can be implemented... 😉

@emyl emyl added the thinking label Aug 6, 2014
@ypereirareis
Copy link

Hi,

I'm interesting in this possibility or implementation too...
Are you still looking at it ?

Thanks

@svenXY
Copy link

svenXY commented Nov 27, 2014

Hi,

I have the exact same requirement.

Specifically, I want to run jpetazzo/pipework to create additional network interfaces.

After vagrant halt && vagrant up, they are gone, thus it would be great if I could recreate them as soon as possible (i.e. before the puppet provisioner runs).

It seems currently not possible to trigger something to run

  • after :up, but
  • before :provision
  • in the initial vagrant up run, which implies provisioning

Thanks,
Sven

@pcriv
Copy link

pcriv commented Dec 9, 2014

+1

@emyl
Copy link
Owner

emyl commented Dec 29, 2014

Starting from version 0.5.0, just released, triggers could be run as a provisioner too:

config.vm.provision "trigger", :option => "value" do |trigger|
  trigger.fire do
    run "script"
  end
end

@emyl emyl closed this as completed Dec 29, 2014
@pcriv
Copy link

pcriv commented Dec 29, 2014

how is this different from 'shell' provisioner?

@emyl
Copy link
Owner

emyl commented Dec 31, 2014

@pablocrivella shell provisioner runs only on the guest, this one could run both on the host and the guest.

@pcriv
Copy link

pcriv commented Dec 31, 2014

aaah hehe right! 😅 thanks @emyl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants