Class: VagrantPlugins::GuestClearLinux::BundleAddProvisioner

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-guests-clearlinux/provisioner.rb

Instance Method Summary collapse

Instance Method Details

#provisionObject



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/vagrant-guests-clearlinux/provisioner.rb', line 71

def provision
  @machine.ui.detail("installing the following bundle(s): '#{@config.bundles}'")
  @machine.communicate.sudo("swupd bundle-add #{@config.bundles}") do |type, data|
    if %i[stderr stdout].include?(type)
      color = type == :stdout ? :green : :red

      options = {}
      options[:color] = color

      @machine.ui.detail(data.chomp, options)
    end
  end
end