Include seeds in ruby communicator

This commit is contained in:
sophia 2021-12-08 11:31:52 -06:00 committed by Paul Hinze
parent ab395ad730
commit ba1dd33fff
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
3 changed files with 4 additions and 7 deletions

View File

@ -96,16 +96,11 @@ func (t *Target) Communicate() (c core.Communicator, err error) {
// TODO: get the communicator name from the Vagrantfile
// eg. t.target.Configuration.ConfigVm.Communicator
communicatorName := "ssh"
communicators, err := t.project.basis.typeComponents(t.ctx, component.CommunicatorType)
communicator, err := t.project.basis.component(t.ctx, component.CommunicatorType, communicatorName)
if err != nil {
return nil, err
}
for name, c := range communicators {
if name == communicatorName {
t.communicator = c.Value.(core.Communicator)
}
}
t.communicator = communicator.Value.(core.Communicator)
return t.communicator, nil
}

View File

@ -5,6 +5,7 @@ module VagrantPlugins
class Communicator
extend Util::Connector
include Util::HasSeeds::Client
attr_reader :broker
attr_reader :client

View File

@ -10,6 +10,7 @@ module VagrantPlugins
prepend Util::HasBroker
prepend Util::ExceptionLogger
prepend Util::HasLogger
include Util::HasSeeds::Service
def initialize(*args, **opts, &block)
super()