2 # Cookbook Name:: serverinfo
5 # Copyright 2015, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 include_recipe "apache"
28 git "/srv/hardware.openstreetmap.org" do
30 repository "git://github.com/gravitystorm/osmf-server-info.git"
33 notifies :run, "execute[/srv/hardware.openstreetmap.org]"
36 nodes = { :rows => search(:node, "*:*") }
37 roles = { :rows => search(:role, "*:*") }
39 file "/srv/hardware.openstreetmap.org/_data/nodes.json" do
44 notifies :run, "execute[/srv/hardware.openstreetmap.org]"
47 file "/srv/hardware.openstreetmap.org/_data/roles.json" do
52 notifies :run, "execute[/srv/hardware.openstreetmap.org]"
55 directory "/srv/hardware.openstreetmap.org/_site" do
61 execute "/srv/hardware.openstreetmap.org" do
63 command "jekyll build --trace"
64 cwd "/srv/hardware.openstreetmap.org"
69 ssl_certificate "hardware.openstreetmap.org" do
70 domains "hardware.openstreetmap.org"
71 notifies :reload, "service[apache2]"
74 apache_site "hardware.openstreetmap.org" do
76 directory "/srv/hardware.openstreetmap.org/_site"