-
-
Save fujin/96037 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
# Divine Panda | |
service "foo" do | |
action :nothing | |
end | |
template "/etc/foo/config.conf" do | |
source "config.conf.erb" | |
action :create | |
notifies :restart, resources(:service => "foo") | |
end | |
# If you wanted to make sure it was always running | |
service "foo" do | |
action :start | |
end |
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
# You will be a happy panda | |
template "/etc/foo/config.conf" do | |
source "config.conf.erb" | |
action :create | |
end | |
service "foo" do | |
action :start | |
end |
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
# Most Insane Panda | |
{ | |
"/etc/foo/config.conf" => "config.conf.erb", | |
"/etc/foo/blah.what" => "blah.what", | |
}.each { |k,v| template(k) { source v; action :create } } | |
%w{/etc/foo/config.conf /etc/foo/blah.what}.each do |t| | |
service("foo") { action :none; subscribes :restart, resources(:template => t), :delayed | |
end |
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
# You will be a sad panda if the service is broken | |
service "foo" do | |
action :start | |
end | |
template "/etc/foo/config.conf" do | |
source "config.conf.erb" | |
action :create | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment