- name: munin-server
run_list:
- recipe[munin::server]
+ - name: mysql
+ run_list:
+ - recipe[mysql::default]
- name: networking
run_list:
- recipe[networking::default]
description "Installs and configures mysql"
long_description IO.read(File.join(File.dirname(__FILE__), "README.md"))
version "1.0.0"
+depends "munin"
attribute "mysql",
:display_name => "MySQL",
service "mysql" do
action [:enable, :start]
- supports :status => true, :restart => true, :reload => true
+ supports :status => true, :restart => true
end
template "/etc/mysql/conf.d/chef.cnf" do
owner "root"
group "root"
mode 0o644
- notifies :reload, "service[mysql]"
+ notifies :restart, "service[mysql]"
end
package "libdbd-mysql-perl"
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("mysql-server") do
+ it { should be_installed }
+end
+
+describe service("mysql") do
+ it { should be_enabled }
+ it { should be_running }
+end
+
+describe port(3306) do
+ it { should be_listening }
+end