X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/d58406548fa7bfd73c181dc9c97081e87e3f7d20..8887ebd0cf98da6d76711fcc2fad4e46f18123a3:/cookbooks/networking/recipes/default.rb diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index ab139e9ff..39611a9df 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -35,8 +35,10 @@ node[:networking][:interfaces].each do |name, interface| prefix = node[:networking][:interfaces][name][:prefix] - node.set[:networking][:interfaces][name][:netmask] = ~IPAddr.new(interface[:address]).mask(0).mask(prefix) + # rubocop:disable Style/RedundantParentheses + node.set[:networking][:interfaces][name][:netmask] = (~IPAddr.new(interface[:address]).mask(0)).mask(prefix) node.set[:networking][:interfaces][name][:network] = IPAddr.new(interface[:address]).mask(prefix) + # rubocop:enable Style/RedundantParentheses end template "/etc/network/interfaces" do