]> git.openstreetmap.org Git - chef.git/commitdiff
Use strings for network families
authorTom Hughes <tom@compton.nu>
Sat, 4 Mar 2023 11:49:05 +0000 (11:49 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 4 Mar 2023 11:50:07 +0000 (11:50 +0000)
cookbooks/networking/recipes/default.rb
cookbooks/networking/templates/default/nftables.conf.erb

index cef11a071a5270f19c9c1978f130012d69cd6c84..12f72aa9f3325718f0b9d55ea9c959834b8dda50 100644 (file)
@@ -383,7 +383,7 @@ link "/etc/resolv.conf" do
   to "../run/systemd/resolve/stub-resolv.conf"
 end
 
-hosts = { :inet => [], :inet6 => [] }
+hosts = { "inet" => [], "inet6" => [] }
 zones = {}
 
 search(:node, "networking:interfaces").collect do |n|
@@ -400,8 +400,8 @@ search(:node, "networking:interfaces").collect do |n|
   end
 end
 
-hosts[:inet] << "127.0.0.1" if hosts[:inet].empty?
-hosts[:inet6] << "::1" if hosts[:inet6].empty?
+hosts["inet"] << "127.0.0.1" if hosts["inet"].empty?
+hosts["inet6"] << "::1" if hosts["inet6"].empty?
 
 if node[:networking][:firewall][:engine] == "shorewall"
   package "shorewall"
index cd48c0b7f039b28f118fe650faadd3f4d1fcd3a1..923437f773394a4f15ec45e6e69ca212dd09a72b 100644 (file)
@@ -5,8 +5,8 @@ define external-interfaces = { <%= @interfaces.sort.uniq.join(", ") %> }
 define ip-private-addresses = { 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.2.0/24, 192.168.0.0/16 }
 define ip6-private-addresses = { 2001:db8::/32, fc00::/7 }
 
-define ip-osm-addresses = { <%= Array(@hosts[:inet]).sort.join(", ") %> }
-define ip6-osm-addresses = { <%= Array(@hosts[:inet6]).sort.join(", ") %> }
+define ip-osm-addresses = { <%= Array(@hosts["inet"]).sort.join(", ") %> }
+define ip6-osm-addresses = { <%= Array(@hosts["inet6"]).sort.join(", ") %> }
 
 flush ruleset