<commit_before>case node[:platform]
when 'ubuntu', 'debian'
  dpkg_package "masakari_1.0.0-1_all" do
    source '/home/stack/masakari/masakari_1.0.0-1_all.deb'
    action :install
  end
when 'redhat', 'centos'
  # TBD
  directory '/etc/masakari' # fake
end

template '/etc/masakari/masakari.conf' do
  source 'masakari.conf.erb'
  owner 'root'
  group 'root'
  mode '0644'
end

template '/home/stack/masakari/masakari_database_setting.sh' do
  source 'masakari_database_setting.sh.erb'
  owner 'stack'
  group 'stack'
  mode '0755'
end

node[:masakari_controller_conf][:hostentrylist].each { |hash|
  hash.each { |host_name, host_ip|
    bash "insert_entry_to_hosts" do
      user "root"
      code <<-EOS
      echo "#{host_ip} #{host_name}" >> /etc/hosts
      EOS
      not_if "grep -q #{host_name} /etc/hosts"
    end<commit_msg>Updated Recipe<commit_after>case node[:platform]
when 'ubuntu', 'debian'
  dpkg_package "masakari_1.0.0-1_all" do
    source '/home/stack/masakari/masakari-controller_1.0.0-1_all.deb'
    action :install
  end
when 'redhat', 'centos'
  # TBD
  directory '/etc/masakari' # fake
end

template '/etc/masakari/masakari.conf' do
  source 'masakari.conf.erb'
  owner 'root'
  group 'root'
  mode '0644'
end

template '/home/stack/masakari/masakari_database_setting.sh' do
  source 'masakari_database_setting.sh.erb'
  owner 'stack'
  group 'stack'
  mode '0755'
end

node[:masakari_controller_conf][:hostentrylist].each { |hash|
  hash.each { |host_name, host_ip|
    bash "insert_entry_to_hosts" do
      user "root"
      code <<-EOS
      echo "#{host_ip} #{host_name}" >> /etc/hosts
      EOS
      not_if "grep -q #{host_name} /etc/hosts"
    end
{'fraction_non_alphanumeric': 0.13528009535160906, 'fraction_numerical': 0.01907032181168057, 'mean_word_length': 3.6, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2886690', 'n_tokens_mistral': 687, 'n_tokens_neox': 662, 'n_words': 136}