0
私の迷彩バージョンをシェフとの競合にダウングレードする必要がありました。現在、私はVagrant 1.8.4を使用していますが、プロビジョニング機能に問題があります。この関数は、私が作成しているインスタンスをブートストラップするために、迷惑メールファイルと同じディレクトリにあるbootstrap.sh
ファイルを使用する必要があります。ここに私のVagrantfileです:迷惑メール1.8.4、ファイルからプロビジョニングシェルを実行できない
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
#gives the instances 1 extra network eth interfaces
config.vm.network "private_network", type: "dhcp"
#creates instances, defines linux image, hostname and a script to run on creation
config.vm.define "web1" do |web1|
web1.vm.box = "trusty64"
web1.vm.hostname = "web1"
#this will run the script bootstrap.sh that is in the same directory as the Vagrantfile
config.vm.provision :shell, path "bootstrap.sh"
end
end
vagrant up
を実行しているとき、私は次のエラーを取得する:
There is a syntax error in the following Vagrantfile. The syntax error
message is reproduced below for convenience:
/path/to/my/dir/Vagrantfile:14: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
config.vm.provision :shell, path "bootstrap.sh"
^
ベイグラント1.8.4におけるプロビジョニングファイルを使用するための正しい構文は何ですか?