Class: VagrantPlugins::GuestClearLinux::BundleRemoveProvisioner

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

Instance Method Summary collapse

Instance Method Details

#provisionObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/vagrant-guests-clearlinux/provisioner.rb', line 87

def provision
  @machine.ui.detail("removing the following bundle(s): '#{@config.bundles}'")
  @machine.communicate.sudo("swupd bundle-remove #{@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