Disable Style/RedundantLineContinuation, as it incorrectly removes line continutations in rhizome/host/lib/vm_setup.rb that are not redundant. All code changes are for _1 => it in blocks.
13 lines
407 B
Ruby
13 lines
407 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Prog::SetupNftables < Prog::Base
|
|
subject_is :sshable, :vm_host
|
|
|
|
label def start
|
|
additional_subnets = vm_host.assigned_subnets.select { |a| a.cidr.version == 4 && a.cidr.network.to_s != vm_host.sshable.host }
|
|
sshable.cmd("sudo host/bin/setup-nftables.rb #{additional_subnets.map { it.cidr.to_s }.to_json.shellescape}")
|
|
|
|
pop "nftables was setup"
|
|
end
|
|
end
|