2

I have a Vagrantfile with multiple nodes defined - say node1, node2, node3.

I want to run a single command

"vagrant up --provision node1,node2"

but this doesn't seem to be possible in one command line, the only way seems to run 2 commands in parallel:

"vagrant up --provision node1"
"vagrant up --provision node2"

Anybody has a workaround to suggest?

A Vagrantfile is a Ruby script, so maybe enriching it with some syntax can get the job done... but I have no Ruby skills...

Pierluigi Vernetto
  • 1,954
  • 1
  • 25
  • 27

1 Answers1

1

You can use a regular expression for choosing which machines you want to operate to. So in your case:

vagrant up --provision /node[1-2]/

Should work.

Emyl
  • 10,460
  • 2
  • 35
  • 34