X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7ae16f9ab1f5c111c81335bdfb143f267f4e2d28..1f0495ace8de757939fde8a77b8070ab3d5f2681:/cookbooks/apache/resources/site.rb diff --git a/cookbooks/apache/resources/site.rb b/cookbooks/apache/resources/site.rb index d6735ba8f..0e6a2fedf 100644 --- a/cookbooks/apache/resources/site.rb +++ b/cookbooks/apache/resources/site.rb @@ -25,3 +25,8 @@ attribute :directory, :kind_of => String attribute :cookbook, :kind_of => String attribute :template, :kind_of => String, :required => true attribute :variables, :kind_of => Hash, :default => {} +attribute :reload_apache, :kind_of => [TrueClass, FalseClass], :default => true + +def after_created + notifies :reload, "service[apache2]" if reload_apache +end