Created
November 7, 2012 18:50
-
-
Save charlesjohnson/4033583 to your computer and use it in GitHub Desktop.
Conditional notification example
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
template "/etc/bind/named.conf.local" do | |
source "named.conf.local.erb" | |
owner "root" | |
group "bind" | |
mode 00644 | |
variables({ | |
:role => node["bind"]["role"], | |
:masters => node["bind"]["masters"], | |
:directory => node["bind"]["zone_dir"] | |
}) | |
notifies :run, "execute[test bind config files]" | |
end | |
execute "test bind config files" do | |
action :nothing | |
command "named-checkconf" | |
notifies :restart, "service[bind9]" | |
end | |
service "bind9" do | |
action [:enable, :start] | |
supports :restart => true, :reload => true, :status => true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment