def update_target(target)
      data = @groups.data_for(target.name)
      data ||= {}

      unless data['config']
        @logger.debug("Did not find config for #{target.name} in inventory")
        data['config'] = {}
      end

      data = self.class.localhost_defaults(data) if target.name == 'localhost'
      # These should only get set from the inventory if they have not yet
      # been instantiated
      set_vars_from_hash(target.name, data['vars']) unless @target_vars[target.name]
      set_facts(target.name, data['facts']) unless @target_facts[target.name]
      data['features']&.each { |feature| set_feature(target, feature) } unless @target_features[target.name]

      # Use Config object to ensure config section is treated consistently with config file
      conf = @config.deep_clone
      conf.update_from_inventory(data['config'])
      conf.validate

      target.update_conf(conf.transport_conf)

      unless target.transport.nil? || Bolt::TRANSPORTS.include?(target.transport.to_sym)
        raise Bolt::UnknownTransportError.new(target.transport, target.uri)
      end

      target
    end
def update_target(target)
      data = @groups.data_for(target.name)
      data ||= {}

      unless data['config']
        @logger.debug("Did not find config for #{target.name} in inventory")
        data['config'] = {}
      end

      data = self.class.localhost_defaults(data) if target.name == 'localhost'
      # These should only get set from the inventory if they have not yet
      # been instantiated
      set_vars_from_hash(target.name, data['vars']) unless @target_vars[target.name]
      set_facts(target.name, data['facts']) unless @target_facts[target.name]
      data['features']&.each { |feature| set_feature(target, feature) } unless @target_features[target.name]

      # Use Config object to ensure config section is treated consistently with config file
      conf = @config.deep_clone
      conf.update_from_inventory(data['config'])
      conf.validate

      target.update_conf(conf.transport_conf)

      unless target.transport.nil? || Bolt::TRANSPORTS.include?(target.transport.to_sym)
        raise Bolt::UnknownTransportError.new(target.transport, target.uri)
      end

      target
    end
Pass a target to get_targets for a public version of this
 Should this reconfigure configured targets?