Hello
Vagrant run tops to bottom.
So you can do
VM2
VM1
# Vagrantfile API/syntax version. Don't touch unless you know what you're
doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise64"
#this is global, will be run on both nodes, ie normal provision
config.vm.provision "shell", inline: "hello global provision"
config.vm.define "n2" do |n2|
n2.vm.hostname = "n2"
end
config.vm.define "n1" do |n1|
n1.vm.hostname = "n1"
#this is n1 local, at this point n2 already exists.
n1.vm.provision "shell", inline: "hello n1 provision"
end
end
On Sun, Aug 21, 2016 at 9:51 AM, Shyam Biradar <[email protected]
> wrote:
> Hello Team
>
> I am facing a issue here.
>
> My vagrantfile creats two vms(vm1, vm2)
> But some configurations of vm1 need to be done after vm2. Flow is like
> this.
> 1. Create Vm1 , configure : Done
> 2. Create Vm2, configure : Done
> 3. Additional Configurion of Vm1: Need help here
>
> How can I specify step 3 in Vagrantfile.
>
> You can take shell as example for configuaration.
>
> --
> 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/ms
> gid/vagrant-up/a9f5e9ec-4612-4d0e-8a45-e69ddf44bcd5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
--
Alvaro
(+31)103400555
--
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/CAHqq0exkJbqqRvnAmPu91fTXLRBDQ8D_ANWggBtTZur_2OMUbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.