From 88b18d754a6bcb6d44a8f16d4ebde9a100d44faf Mon Sep 17 00:00:00 2001 From: Miguel Negron Date: Fri, 26 Apr 2024 15:03:52 +0100 Subject: [PATCH] Clean code --- resources/recipes/prepare_system.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/recipes/prepare_system.rb b/resources/recipes/prepare_system.rb index 2cd8c9cd..02cbda1c 100644 --- a/resources/recipes/prepare_system.rb +++ b/resources/recipes/prepare_system.rb @@ -27,7 +27,6 @@ sync_net = `cat /etc/redborder/rb_init_conf.yml | grep sync_net | awk '{print $2'} | sed 's|/.*||'`.strip node['network']['interfaces'].each do |interface, details| next unless "x#{interface}" != "xlo" - # ipaddress_sync = details['addresses'].keys[1] if (details['addresses'] and ipaddress_sync != details['addresses'].keys[1]) ipaddress_sync = `ip route get #{sync_net} | head -n 1 | awk '{for (i=1; i<=NF; i++) if ($i == "src") print $(i+1)}'`.strip end node.default[:ipaddress_sync]=ipaddress_sync