vagrantでchef soloのprovisionを実行した際
$vagrant provision ==> default: Chef 11.12.2 Omnibus package is already installed. ==> default: Running provisioner: chef_solo... Generating chef JSON and uploading... Running chef-solo... [2014-04-11T07:35:32+00:00] INFO: Forking chef instance to converge... [2014-04-11T07:35:32+00:00] WARN: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * SSL validation of HTTPS requests is disabled. HTTPS connections are still encrypted, but chef is not able to detect forged replies or man in the middle attacks. To fix this issue add an entry like this to your configuration file: ``` # Verify all HTTPS connections (recommended) ssl_verify_mode :verify_peer # OR, Verify only connections to chef-server verify_api_cert true ``` To check your SSL configuration, or troubleshoot errors, you can use the `knife ssl check` command like so: ``` knife ssl check -c /tmp/vagrant-chef-1/solo.rb ``` * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
という警告が表示される
vagrant – chef-solo ssl warning when provisioning – Stack Overflowより、
Vagrantfileのconfig.vm.provision “chef_solo” に
Vagrant.configure("2") do |config| config.vm.provision "chef_solo" do |chef| # 以下を追加 chef.custom_config_path = "Vagrantfile.chef" end end
Vagrantfileと同じ場所に「Vagrantfile.chef」というファイルを作成、中身に
Chef::Config.ssl_verify_mode = :verify_peer
と記述した後、vagrant reload, vagrant provisionで解決しました。