]> git.openstreetmap.org Git - chef.git/commitdiff
gitweb: Add notice about github.
authorGrant Slater <git@firefishy.com>
Tue, 19 Jul 2022 00:30:26 +0000 (03:30 +0300)
committerGrant Slater <git@firefishy.com>
Tue, 19 Jul 2022 00:30:26 +0000 (03:30 +0300)
cookbooks/git/recipes/web.rb
cookbooks/git/templates/default/gitweb.conf.erb
cookbooks/git/templates/default/indextext.html.erb [new file with mode: 0644]

index 7e1f38cc26c1bd4da1a50ff38fa902c4a076565e..4bdd501604aab4bd75e45d8a51996847c5a6349b 100644 (file)
@@ -45,6 +45,13 @@ template "/srv/#{git_site}/robots.txt" do
   mode "644"
 end
 
+template "/srv/#{git_site}/indextext.html" do
+  source "indextext.html.erb"
+  owner "root"
+  group "root"
+  mode "644"
+end
+
 ssl_certificate git_site do
   domains [git_site] + Array(node[:git][:aliases])
   notifies :reload, "service[apache2]"
index 5d2eb746924b10628766b8a6f8cb700c5e3dc1a5..4cfe1c24ff081eeac9d28c64736c4203ba340e88 100644 (file)
@@ -10,7 +10,7 @@ $git_temp = "/tmp";
 #$home_link = $my_uri || "/";
 
 # html text to include at home page
-$home_text = "indextext.html";
+$home_text = "/srv/<%= node[:git][:host] %>/indextext.html";
 
 # file with project list; by default, simply scan the projectroot dir.
 $projects_list = $projectroot;
diff --git a/cookbooks/git/templates/default/indextext.html.erb b/cookbooks/git/templates/default/indextext.html.erb
new file mode 100644 (file)
index 0000000..c6493db
--- /dev/null
@@ -0,0 +1,3 @@
+<h2>Want to contribute to OpenStreetMap software?</h2>
+<p>Head over to <a href="https://github.com/openstreetmap/">github.com/openstreetmap/</a></p>
+<p>git.openstreetmap.org is an internal system we use as part of our deployment system.</p>