Hmmm... I think I like it.  It's the vagrant-triggers plugin to which you 
prefer.

I'm not particularly interested in running a script as the action block 
(and thereby forking a subprocess) as in your example.  However it appears 
that the DSL allows to execute any arbitrary ruby code block - that works 
for me.

Thanks!

On Friday, May 16, 2014 7:36:47 PM UTC-4, Matt Palmer wrote:
>
> On Fri, May 16, 2014 at 04:30:02PM -0700, Russell Roy wrote: 
> > I'd like to tie additional actions to 'vagrant up' and 'vagrant destroy' 
> by 
> > making appropriate modifications to my Vagrantfile (specifically I want 
> to 
> > dynamically create and destroy aws entities (like subnets) utilizing aws 
> > ruby sdk and/or modifications to vagrant-aws plugin) 
> > 
> > Any suggestions as to the cleanest means by which to accomplish this? 
>
> Use a trigger.  For example, I nuke nodes out of my local puppetmaster 
> before destroying them, so I don't have stale certs and exported resources 
> laying around: 
>
> config.trigger.before :destroy, 
>                       :execute => "vagrant ssh master -c 'sudo 
> nuke-node-with-extreme-prejudice <hostname>'" 
>
> I'm fairly certain there's also `config.trigger.after`, and substituting 
> :up 
> for :destroy should be a sane action to take. 
>
> - Matt 
>
> -- 
> I killed init(8) and all I got was this lousy kernel panic. 
>                 -- Graham Reed, in the Monastery 
>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to