title: Chef-solo and vagrant to automatically run an MySql script after install?
body: <p>Im pretty new to vagrant and chef so this may very well be an easy question. </p>
  
  <p>I have managed to get chef to install MySql, PHP etc</p>
  
  <p>After this I need the VM to run about 3 SQL scripts, is this possible using chef or is it something I should move into a shell script and run after initiation?</p>
  
  <p>My Vagrant File - </p>
  
  <pre><code># -*- mode: ruby -*-
  # vi: set ft=ruby :
  
  Vagrant.configure("2") do |config|
    config.vm.box = "raring32.box"
    config.vm.box_url = "http://[local network location]/raring32.box"
    config.vm.network :forwarded_port, guest: 80, host: 8888
  
      config.vm.provision :chef_solo do |chef|
          chef.cookbooks_path = "cookbooks"
          chef.add_recipe "openssl"
          chef.add_recipe "apache2"
          chef.add_recipe "mysql"
          chef.add_recipe "mysql::server"
          chef.add_recipe "php"
          chef.add_recipe "php::module_apc"
          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.json = {
              "mysql" =&gt; {
                  "server_root_password" =&gt; "hello",
                  "server_repl_password" =&gt; "hello",
                  "server_debian_password" =&gt; "hello"
                  }
          }   
          chef.add_recipe "Database:Mysql"    
      end
  end
  </code></pre>
  
  <p>Thanks for any help.</p>