From 7e9dad2b3eda684a4c2b9498bc2d675d120b10c3 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Fri, 18 Feb 2022 16:34:33 -0800 Subject: [PATCH] Add remote host plugin --- lib/vagrant/plugin/remote/host.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/vagrant/plugin/remote/host.rb diff --git a/lib/vagrant/plugin/remote/host.rb b/lib/vagrant/plugin/remote/host.rb new file mode 100644 index 000000000..d38fef800 --- /dev/null +++ b/lib/vagrant/plugin/remote/host.rb @@ -0,0 +1,23 @@ +module Vagrant + module Plugin + module Remote + class Host < V2::Host + attr_accessor :client + + def initialize(*_, **kwargs) + @client = kwargs.delete(:client) + if @client.nil? + raise ArgumentError, + "Remote client is required for `#{self.class.name}`" + end + super + end + + # @return [Boolean] + def detect?(env) + client.detect(env) + end + end + end + end +end