title: How i can add "ServerName xxx" in httpd.conf through chef / vagrant
body: <p>I'm playing with a vagrant Centos 6.4 box,</p>
  
  <p>here's the relevant part of my Vagrantfile</p>
  
  <pre><code>  config.vm.provision :chef_solo do |chef|
      chef.json = {
          "apache" =&gt; {
              "listen_address" =&gt; "0.0.0.0",
              "server_name" =&gt; "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
  </code></pre>
  
  <p>Unfortunately when i do <code>vagrant provision</code> i get some errors because apache doesn't start properly. The error is <code>httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName</code></p>
  
  <p>If i do <code>vagrant ssh</code> then i can fix it adding <code>ServerName localhost</code> to the httpd.conf (/var/httpd/conf/httpd.conf) and httpd service starts properly.</p>
  
  <p><strong>How can I add this as attribute in <code>chef.json</code>?</strong> </p>