LoginSignup
3
3

More than 5 years have passed since last update.

Vagrantfileからlocalhost.jsonを読み込む方法

Posted at
Vagrantfile
  config.vm.provision :chef_solo do |chef|
    chef.json = JSON.parse(File.read("localhost.json"))

これでVagrantfileと同じディレクトリにあるlocalhost.jsonを読み込んでくれます。

用途としては…

仮想開発環境用のlocalhost.jsonと、本番環境へのchef-soloコマンドに渡す用のprod.jsonを同じファイル形式で並べておける、とか。

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