+ mode 0o644
+end
+
+ssl_certificate git_site do
+ domains [git_site] + Array(node[:git][:aliases])
+ notifies :reload, "service[apache2]"
+end
+
+private_allowed = search(:node, node[:git][:private_nodes]).collect do |n|
+ n.ipaddresses(:role => :external)
+end.flatten
+
+apache_site git_site do
+ template "apache.erb"
+ directory "/srv/#{git_site}"
+ variables :aliases => Array(node[:git][:aliases]),
+ :private_allowed => private_allowed