LoginSignup
3
3

More than 5 years have passed since last update.

Vagrant 1.7.2のchef-zeroプロビジョナでCookbooksの同期バグを一時的に回避する

Posted at

EC2などをプロバイダにした時、2回目以降の同期対象がおかしいアレ。

Problem reloading Chef shared folders · Issue #5199 · mitchellh/vagrant

で、とりあえずの回避策。
.vagrant/machines/default/aws/synced_foldersファイルがなければ毎回rsyncに行くので、Vagrantfileで消す。


# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

if Vagrant::VERSION == "1.7.2"
  synced_folder_files = Dir.glob(File.expand_path("../.vagrant/machines/**/synced_folders", __FILE__))
  synced_folder_files.map do |synced_folder_file|
    File.unlink(synced_folder_file) if File.exists?(synced_folder_file)
  end
end

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

## -- ship --

vagrantコマンドを何かしら実行するたびにsynced_foldersファイルが消えちゃうけど、実害はないのでいいっしょ。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3