X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/09e5083a36632d53e388446d0517a5c2bccd2b24..ac5078a9f96753d4ff0853ec88cb8a2393fbb758:/cookbooks/apache/resources/module.rb diff --git a/cookbooks/apache/resources/module.rb b/cookbooks/apache/resources/module.rb index f2d95551e..cded39a47 100644 --- a/cookbooks/apache/resources/module.rb +++ b/cookbooks/apache/resources/module.rb @@ -24,3 +24,8 @@ attribute :name, :kind_of => String, :name_attribute => true attribute :package, :kind_of => String attribute :conf, :kind_of => String attribute :variables, :kind_of => Hash, :default => {} +attribute :restart_apache, :kind_of => [TrueClass, FalseClass], :default => true + +def after_created + notifies :restart, "service[apache2]" if restart_apache +end