<commit_before>no_active_vagrant = system('vagrant global-status | grep "There are no active Vagrant environments on this computer" >/dev/null')

case node[:platform]
when 'darwin'
  cask 'vagrant'

  if no_active_vagrant
    cask 'virtualbox'
  end
when 'redhat'
  %w(
    kernel-headers
    kernel-devel
    dkms
  ).each do |pkg|
    package pkg
  end

  execute 'download repo file' do
    command <<-"EOF"
      cd /etc/yum.repos.d
      curl -LO #{node[:virtualbox][:yum_repository]}
    EOF
    not_if 'test -e /etc/yum.repos.d/virtualbox.repo'
  end

  package node[:virtualbox][:package]

  package node[:vagrant][:rpm_url] do
    not_if 'rpm -q %s' % node[:vagrant][:package]
  end

  if no_active_vagrant
    execute 'setup virtualbox' do
      command '/usr/lib/virtualbox/vboxdrv.sh setup'
      not_if 'rpm -q %s' % node[:virtualbox][:package]
    end
  end
end<commit_msg>[mitamae] Install vagrant plugins<commit_after>no_active_vagrant = system('vagrant global-status | grep "There are no active Vagrant environments on this computer" >/dev/null')

case node[:platform]
when 'darwin'
  cask 'vagrant'

  if no_active_vagrant
    cask 'virtualbox'
  end
when 'redhat'
  %w(
    kernel-headers
    kernel-devel
    dkms
  ).each do |pkg|
    package pkg
  end

  execute 'download repo file' do
    command <<-"EOF"
      cd /etc/yum.repos.d
      curl -LO #{node[:virtualbox][:yum_repository]}
    EOF
    not_if 'test -e /etc/yum.repos.d/virtualbox.repo'
  end

  package node[:virtualbox][:package]

  package node[:vagrant][:rpm_url] do
    not_if 'rpm -q %s' % node[:vagrant][:package]
  end

  if no_active_vagrant
    execute 'setup virtualbox' do
      command '/usr/lib/virtualbox/vboxdrv.sh setup'
      not_if 'rpm -q %s' % node[:virtualbox][:package]
    end
  end
end

%w[
  vagrant-cachier
  vagrant-proxyconf
].each do |plugin|
  execute "vagrant plugin install #{plugin}" do
    not_if "vagrant plugin list | grep -q #{plugin}"
  end
end
{'fraction_non_alphanumeric': 0.11997966446365023, 'fraction_numerical': 0.0, 'mean_word_length': 3.2141327623126337, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2544334', 'n_tokens_mistral': 745, 'n_tokens_neox': 712, 'n_words': 189}