Skip to content

Instantly share code, notes, and snippets.

@lxndrp
Created January 24, 2013 11:17
Show Gist options
  • Save lxndrp/4620197 to your computer and use it in GitHub Desktop.
Save lxndrp/4620197 to your computer and use it in GitHub Desktop.
if node["recipes"].find_index("firewall")
Chef::Log.info "Restarting libvirt after firewall setup"
service "libvirt" do
action :nothing
subscribes :restart, resources("service[#{node["firewall"]["backend"]}]"), :immediately
notifies :restart, "service[libvirt]"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment