|
17 | 17 | # limitations under the License.
|
18 | 18 | #
|
19 | 19 |
|
| 20 | +include_recipe "accounts" |
20 | 21 | include_recipe "apache"
|
21 | 22 | include_recipe "git"
|
22 | 23 | include_recipe "ruby"
|
|
30 | 31 | pkg-config
|
31 | 32 | ]
|
32 | 33 |
|
| 34 | +directory "/srv/hardware.openstreetmap.org" do |
| 35 | + owner "serverinfo" |
| 36 | + group "serverinfo" |
| 37 | + mode "755" |
| 38 | +end |
| 39 | + |
33 | 40 | git "/srv/hardware.openstreetmap.org" do
|
34 | 41 | action :sync
|
35 | 42 | repository "https://github.com/osmfoundation/osmf-server-info.git"
|
36 | 43 | depth 1
|
37 |
| - user "root" |
38 |
| - group "root" |
| 44 | + user "serverinfo" |
| 45 | + group "serverinfo" |
39 | 46 | notifies :run, "bundle_install[/srv/hardware.openstreetmap.org]"
|
40 | 47 | end
|
41 | 48 |
|
|
45 | 52 | file "/srv/hardware.openstreetmap.org/_data/nodes.json" do
|
46 | 53 | content nodes.to_json
|
47 | 54 | mode "644"
|
48 |
| - owner "root" |
49 |
| - group "root" |
| 55 | + owner "serverinfo" |
| 56 | + group "serverinfo" |
50 | 57 | notifies :run, "bundle_exec[/srv/hardware.openstreetmap.org]"
|
51 | 58 | end
|
52 | 59 |
|
53 | 60 | file "/srv/hardware.openstreetmap.org/_data/roles.json" do
|
54 | 61 | content roles.to_json
|
55 | 62 | mode "644"
|
56 |
| - owner "root" |
57 |
| - group "root" |
| 63 | + owner "serverinfo" |
| 64 | + group "serverinfo" |
58 | 65 | notifies :run, "bundle_exec[/srv/hardware.openstreetmap.org]"
|
59 | 66 | end
|
60 | 67 |
|
61 |
| -directory "/srv/hardware.openstreetmap.org/_site" do |
62 |
| - mode "755" |
63 |
| - owner "nobody" |
64 |
| - group "nogroup" |
65 |
| -end |
66 |
| - |
67 |
| -directory "/srv/hardware.openstreetmap.org/vendor" do |
68 |
| - action :create |
69 |
| - owner "nobody" |
70 |
| - group "nogroup" |
71 |
| - notifies :run, "bundle_install[/srv/hardware.openstreetmap.org]", :immediately |
72 |
| -end |
73 |
| - |
74 | 68 | bundle_config "/srv/hardware.openstreetmap.org" do
|
75 |
| - user "nobody" |
76 |
| - group "nogroup" |
| 69 | + action :create |
| 70 | + user "serverinfo" |
| 71 | + group "serverinfo" |
77 | 72 | settings "deployment" => "true",
|
78 | 73 | "without" => "development:test",
|
79 | 74 | "jobs" => node.cpu_cores.to_s
|
| 75 | + notifies :run, "bundle_exec[/srv/hardware.openstreetmap.org]" |
80 | 76 | end
|
81 | 77 |
|
82 | 78 | bundle_install "/srv/hardware.openstreetmap.org" do
|
83 | 79 | action :nothing
|
84 |
| - user "nobody" |
85 |
| - group "nogroup" |
| 80 | + user "serverinfo" |
| 81 | + group "serverinfo" |
86 | 82 | notifies :run, "bundle_exec[/srv/hardware.openstreetmap.org]"
|
87 | 83 | end
|
88 | 84 |
|
89 | 85 | bundle_exec "/srv/hardware.openstreetmap.org" do
|
90 | 86 | action :nothing
|
91 | 87 | command "jekyll build --trace --disable-disk-cache --baseurl=https://hardware.openstreetmap.org"
|
92 |
| - user "nobody" |
93 |
| - group "nogroup" |
| 88 | + user "serverinfo" |
| 89 | + group "serverinfo" |
94 | 90 | environment "LANG" => "C.UTF-8"
|
95 | 91 | end
|
96 | 92 |
|
|
0 commit comments