使用正则表达式流浪多台机器
Vagrant up multiple machines using regex
我在 vagrant 手册中 see:
... you may have a leader machine as well as a follower0
, follower1
, follower2
, etc. If you want to bring up all the followers but not the leader, you
can just do vagrant up /follower[0-9]/
. If Vagrant sees a machine name
within forward slashes, it assumes you are using a regular
expression.
我在我的 windows 机器上(在 git bash window 中尝试了 运行 以下命令但它失败了(我的机器名称是 node1
和 node2
):
$ vagrant.exe up /node[1-2]/
The machine with the name '/node[1-2]/' was not found configured for
this Vagrant environment.
我试过使用斜杠进行转义,但没有用:
vagrant.exe up //node[1-2]//
vagrant.exe up \/node[1-2]\/
vagrant.exe up \node[1-2]\
有什么想法吗?
有一个 known issue,修复将包含在 1.8.2 中。
如果你想自己构建 vagrant,它已经包含在核心中
我在 vagrant 手册中 see:
... you may have a leader machine as well as a
follower0
,follower1
,follower2
, etc. If you want to bring up all the followers but not the leader, you can just dovagrant up /follower[0-9]/
. If Vagrant sees a machine name within forward slashes, it assumes you are using a regular expression.
我在我的 windows 机器上(在 git bash window 中尝试了 运行 以下命令但它失败了(我的机器名称是 node1
和 node2
):
$ vagrant.exe up /node[1-2]/
The machine with the name '/node[1-2]/' was not found configured for
this Vagrant environment.
我试过使用斜杠进行转义,但没有用:
vagrant.exe up //node[1-2]//
vagrant.exe up \/node[1-2]\/
vagrant.exe up \node[1-2]\
有什么想法吗?
有一个 known issue,修复将包含在 1.8.2 中。
如果你想自己构建 vagrant,它已经包含在核心中