Re: [vagrant-up] How-to specify a trigger to run before a specific provisioner script

2020-02-14 Thread Brian Cain
On Fri, Feb 14, 2020 at 10:53 AM Steve Freeman wrote: > Okay, but how do I obtain the provisioner's name so I can conditionally > execute the code? > That would run before *all* provisioners. You can't run a trigger before a specific provisioner at the moment. You can run provisioners before or

Re: [vagrant-up] How-to specify a trigger to run before a specific provisioner script

2020-02-14 Thread Steve Freeman
Okay, but how do I obtain the provisioner's name so I can conditionally execute the code? On Tuesday, February 11, 2020 at 3:48:23 PM UTC-5, Brian Cain wrote: > > > > On Tue, Feb 11, 2020 at 12:29 PM Steve Freeman > wrote: > >> I'm trying to write out a configuration file based on the state of

Re: [vagrant-up] How-to specify a trigger to run before a specific provisioner script

2020-02-11 Thread Brian Cain
On Tue, Feb 11, 2020 at 12:29 PM Steve Freeman wrote: > I'm trying to write out a configuration file based on the state of > execution at that point in the overall provisioning process. If I don't > use a trigger, then the code will execute the code to write the file with > different parameters

Re: [vagrant-up] How-to specify a trigger to run before a specific provisioner script

2020-02-11 Thread .
Vagrant has the idea of events and triggers, however, they are very limited in what they can do. They typically only fire when a Vagrant specific command fires - https://www.vagrantup.com/docs/triggers/ You can create your own (I believe that the host_updater plugin takes advantage of this)

Re: [vagrant-up] How-to specify a trigger to run before a specific provisioner script

2020-02-11 Thread Steve Freeman
One other point, the trigger runs on the host, not the guest. The resulting file is to be used on the guest. On Tuesday, February 11, 2020 at 3:28:58 PM UTC-5, Steve Freeman wrote: > > I'm trying to write out a configuration file based on the state of > execution at that point in the overall

Re: [vagrant-up] How-to specify a trigger to run before a specific provisioner script

2020-02-11 Thread Steve Freeman
I'm trying to write out a configuration file based on the state of execution at that point in the overall provisioning process. If I don't use a trigger, then the code will execute the code to write the file with different parameters while the Vagrantfile is being evaluated. The resulting