浮浪者の Centos 6.4 ボックスで遊んでいます。
ここに私のVagrantfileの関連部分があります
config.vm.provision :chef_solo do |chef|
chef.json = {
"apache" => {
"listen_address" => "0.0.0.0",
"server_name" => "localhost", # ?? this doesn't work
},
}
chef.add_recipe "yum"
chef.add_recipe "selinux::disabled"
chef.add_recipe "vim"
# chef.add_recipe "openssl"
chef.add_recipe "apache2"
chef.add_recipe "php"
chef.add_recipe "php::module_curl"
chef.add_recipe "php::module_mysql"
chef.add_recipe "apache2::mod_php5"
chef.add_recipe "apache2::mod_rewrite"
chef.add_recipe "my"
end
残念ながら、vagrant provision
Apache が正しく起動しないため、エラーが発生します。エラーはhttpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
そうすれば、httpd.conf(/var/httpd/conf/httpd.conf)vagrant ssh
に追加して修正でき、httpdサービスが適切に開始されます。ServerName localhost
これを の属性として追加するにはどうすればよいchef.json
ですか?