Created
April 10, 2013 19:35
-
-
Save qhartman/5357739 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#The original template resource def: | |
template "#{node['mysql']['conf_dir']}/my.cnf" do | |
source "my.cnf.erb" | |
owner "root" unless platform_family? 'windows' | |
group node['mysql']['root_group'] unless platform_family? 'windows' | |
mode "0644" | |
case node['mysql']['reload_action'] | |
when 'restart' | |
notifies :restart, resources(:service => "mysql"), :immediately | |
when 'reload' | |
notifies :reload, resources(:service => "mysql"), :immediately | |
else | |
Chef::Log.info "my.cnf updated but mysql.reload_action is #{node['mysql']['reload_action']}. No action taken." | |
end | |
variables :skip_federated => skip_federated | |
end | |
# I want to Use our custom config template instead, but this doesn't work | |
edit "template[#{node['mysql']['conf_dir']}/my.cnf]" do | |
source "mysql/my.cnf.erb" | |
end | |
# Neither does this | |
edit "template[/etc/my.cnf]" do | |
source "mysql/my.cnf.erb" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment