]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'github/pull/638'
authorTom Hughes <tom@compton.nu>
Wed, 22 Nov 2023 22:08:55 +0000 (22:08 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Nov 2023 22:08:55 +0000 (22:08 +0000)
cookbooks/apt/recipes/default.rb
cookbooks/apt/recipes/management-component-pack.rb
cookbooks/chef/recipes/default.rb
cookbooks/exim/templates/default/exim4.conf.erb
cookbooks/fail2ban/recipes/default.rb
cookbooks/hardware/recipes/default.rb
cookbooks/stateofthemap/recipes/container.rb
cookbooks/web/recipes/rails.rb
roles/gateway.rb

index 47bd0ad18dac097f4ceb2d8f724afd3f4696c47a..4cd4b79262f14bd95adcaa6b3f3d6475285a00b5 100644 (file)
@@ -49,7 +49,7 @@ if platform?("debian")
   archive_distro = "debian"
   archive_security_distro = "debian-security"
   archive_suites = %w[main updates security]
-  archive_components = %w[main contrib non-free]
+  archive_components = %w[main contrib non-free non-free-firmware]
 elsif intel?
   archive_host = if node[:country]
                    "#{node[:country]}.archive.ubuntu.com"
index 34aad4d5e3cf542f31d852edf1e56dba2a596d78..700ac02bd23b9f8c20b2c1ea1456432c5643872b 100644 (file)
@@ -24,20 +24,11 @@ apt_repository "management-component-pack" do
 end
 
 if platform?("debian")
-  if node[:dmi][:system][:product_name].end_with?("Gen10")
-    apt_repository "mcp-gen10" do
-      uri "https://downloads.linux.hpe.com/SDR/repo/mcp"
-      distribution "#{node[:lsb][:codename]}/current-gen10"
-      components ["non-free"]
-      key "C208ADDE26C2B797"
-    end
-  else
-    apt_repository "mcp" do
-      uri "https://downloads.linux.hpe.com/SDR/repo/mcp"
-      distribution "#{node[:lsb][:codename]}/current"
-      components ["non-free"]
-      key "C208ADDE26C2B797"
-    end
+  apt_repository "mcp" do
+    uri "https://downloads.linux.hpe.com/SDR/repo/mcp"
+    distribution "#{node[:lsb][:codename]}/current"
+    components ["non-free"]
+    key "C208ADDE26C2B797"
   end
 elsif platform?("ubuntu")
   if node[:dmi][:system][:product_name].end_with?("Gen10")
index d06162465a702d20ea9c29f5d9329a807f03c241..91a91001c3d4254e6bfc9db199e7c6688166acb0 100644 (file)
@@ -49,7 +49,11 @@ Dir.glob("#{cache_dir}/chef_*.deb").each do |deb|
   end
 end
 
-os_release = node[:lsb][:release]
+os_release = if platform?("debian") && node[:lsb][:release].to_f > 11
+               11
+             else
+               node[:lsb][:release]
+             end
 
 remote_file "#{cache_dir}/#{chef_package}" do
   source "https://packages.chef.io/files/stable/chef/#{chef_version}/#{chef_platform}/#{os_release}/#{chef_package}"
index 6babb839a208c80fe1975e23c9f737ecae420f15..635682e2ea2407aaa6d9df50897b3a3ba58de8dc 100644 (file)
@@ -506,7 +506,11 @@ acl_check_rcpt:
   # relay domains is to use a callout (add /callout), but please read the
   # documentation about callouts before doing this.
 
-  require verify = recipient
+  deny    domains = +relay_to_domains
+         !verify  = recipient/callout=use_sender
+
+  deny    domains = !+relay_to_domains
+         !verify  = recipient
 
 <% if node[:exim][:dns_blacklists] -%>
   # Deny any messages from hosts in certain blacklists.
index 0a4c479f469537a5d88b92b8d54c9ba2ce3f4ae8..060251680b6d9201ba6e1434e618253eb5d52c12 100644 (file)
@@ -22,9 +22,16 @@ include_recipe "prometheus"
 
 package %w[
   fail2ban
+  python3-systemd
   ruby-webrick
 ]
 
+if platform?("debian")
+  package "python3-inotify"
+else
+  package "gamin"
+end
+
 template "/etc/fail2ban/jail.d/00-default.conf" do
   source "jail.default.erb"
   owner "root"
index 5e48994764716fc93232bcdddeabbac66fed82a4..d7c508d9aadabf7dd81929ec698643f1088cd6e8 100644 (file)
@@ -28,6 +28,10 @@ ohai_plugin "hardware" do
   template "ohai.rb.erb"
 end
 
+if platform?("debian")
+  package "firmware-linux"
+end
+
 if node[:cpu] && node[:cpu][:"0"] && node[:cpu][:"0"][:vendor_id]
   case node[:cpu][:"0"][:vendor_id]
   when "GenuineIntel"
index 8f0786ce453cb9226b371f271d7a4f84a4e51354..16cb780ece1e41abd74a9db2f8dedce6720bde91 100644 (file)
@@ -24,7 +24,7 @@ podman_site "stateofthemap.org" do
   aliases ["www.stateofthemap.org", "stateofthemap.com", "www.stateofthemap.com", "sotm.org", "www.sotm.org"]
 end
 
-%w[2013 2016 2017 2018 2019 2020 2021 2022].each do |year|
+%w[2013 2016 2017 2018 2019 2020 2021 2022 2024].each do |year|
   podman_site "#{year}.stateofthemap.org" do
     image "ghcr.io/openstreetmap/stateofthemap-#{year}:latest"
     aliases ["#{year}.stateofthemap.com", "#{year}.sotm.org"]
index fd3d59f2d501db37f830bc6eaa1f8bc5aa7ed87a..dd0086b70a5e9f21854f9dde79d7fb80fae43a9d 100644 (file)
@@ -123,7 +123,7 @@ rails_port "www.openstreetmap.org" do
   google_openid_realm "https://www.openstreetmap.org"
   facebook_auth_id "427915424036881"
   facebook_auth_secret web_passwords["facebook_auth_secret"]
-  microsoft_auth_id "45ef48fb-6a13-4239-b842-133608b8edd7"
+  microsoft_auth_id "e34f14f1-f790-40f3-9fa4-3c5f1a027c38"
   microsoft_auth_secret web_passwords["microsoft_auth_secret"]
   github_auth_id "acf7da34edee99e35499"
   github_auth_secret web_passwords["github_auth_secret"]
index a78f04bcf849bd056ecf9a4ae09a863161133c4a..d842bf41268e418e7f2c4f56da167a3388c5c26c 100644 (file)
@@ -7,9 +7,6 @@ default_attributes(
       :comment => "Enable forwarding",
       :parameters => { "net.ipv4.ip_forward" => "1" }
     }
-  },
-  :exim => {
-    :relay_from_hosts => ["10.0.0.0/8"]
   }
 )