]> git.openstreetmap.org Git - chef.git/blob - cookbooks/geodns/recipes/default.rb
Set trace_use_job_queue to false
[chef.git] / cookbooks / geodns / recipes / default.rb
1 #
2 # Cookbook Name:: geodns
3 # Recipe:: default
4 #
5 # Copyright 2011, OpenStreetMap Foundation
6 #
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
10 #
11 #     https://www.apache.org/licenses/LICENSE-2.0
12 #
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.
18 #
19
20 package %w[
21   geoip-database-contrib
22   gdnsd
23 ]
24
25 template "/etc/gdnsd/config" do
26   source "config.erb"
27   owner "root"
28   group "root"
29   mode 0o644
30   notifies :restart, "service[gdnsd]"
31 end
32
33 template "/etc/gdnsd/zones/geo.openstreetmap.org" do
34   source "geo.erb"
35   owner "root"
36   group "root"
37   mode 0o644
38   notifies :restart, "service[gdnsd]"
39 end
40
41 service "systemd-resolved" do
42   action [:disable, :stop]
43 end
44
45 service "gdnsd" do
46   action [:enable, :start]
47   supports :status => true, :restart => true, :reload => true
48 end
49
50 firewall_rule "accept-dns-udp" do
51   action :accept
52   source "net"
53   dest "fw"
54   proto "udp"
55   dest_ports "domain"
56 end
57
58 firewall_rule "accept-dns-tcp" do
59   action :accept
60   source "net"
61   dest "fw"
62   proto "tcp:syn"
63   dest_ports "domain"
64 end