Reputation: 21
I have a Vagrantfile that creates two machines. I need to run scripts on these machines in the order 1 -> 2 -> 1 -> 2
I can run the first set of scripts easily enough, but I can't figure out how to run the second script on the first machine after the second machine has been built.
I have tried using Vagrant Triggers, and while I can then run a second script on the first machine, it's before the second machine has built.
Is there any way I can apply the scripts in this order?
Upvotes: 1
Views: 152
Reputation: 21
I found that a way to do this was to have a second Vagrantfile with different provisioning scripts but pointing to the same machines. When the second Vagrantfile runs after the first it provisions them with the new code.
Upvotes: 1