X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/d16a271815bbfa1c2d5f38f106db0c7af7291a52..e698e02106fc290ff3e530f5de66a91868a7f1f8:/cookbooks/dns/recipes/default.rb diff --git a/cookbooks/dns/recipes/default.rb b/cookbooks/dns/recipes/default.rb index a37b8b157..057daf55c 100644 --- a/cookbooks/dns/recipes/default.rb +++ b/cookbooks/dns/recipes/default.rb @@ -17,8 +17,9 @@ # limitations under the License. # -include_recipe "git" +include_recipe "accounts" include_recipe "apache" +include_recipe "git" geoservers = search(:node, "roles:geodns").collect(&:name).sort @@ -29,17 +30,18 @@ package %w[ parallel rsync perl + libdigest-sha-perl + libjson-xs-perl + libwww-perl libxml-treebuilder-perl libxml-writer-perl - libyaml-perl - libwww-perl - libjson-xs-perl - sshfp + libyaml-libyaml-perl + lockfile-progs ] remote_file "/usr/local/bin/dnscontrol" do action :create - source "https://github.com/StackExchange/dnscontrol/releases/download/v3.0.0/dnscontrol-Linux" + source "https://github.com/StackExchange/dnscontrol/releases/download/v3.2.0/dnscontrol-Linux" owner "root" group "root" mode 0o755 @@ -131,6 +133,7 @@ cookbook_file "#{node[:dns][:repository]}/hooks/post-receive" do owner "git" group "git" mode 0o750 + only_if { ::Dir.exist?("#{node[:dns][:repository]}/hooks") } end template "/usr/local/bin/dns-check" do @@ -141,9 +144,9 @@ template "/usr/local/bin/dns-check" do variables :passwords => passwords, :geoservers => geoservers end -template "/etc/cron.d/dns" do - source "cron.erb" - owner "root" - group "root" - mode 0o644 +cron_d "dns" do + minute "*/3" + user "git" + command "/usr/local/bin/dns-check" + mailto "admins@openstreetmap.org" end