<commit_before># Use Chef cache as tmp location
tmp_loc = Chef::Config[:file_cache_path]

remote_file "#{tmp_loc}/terraform.zip" do
  source node['bubble']['terraform_download_url']
  mode '0644'
  backup false
end

bash 'unzip_terraform' do
  user 'root'
  cwd "#{tmp_loc}"
  code <<-EOH
  unzip terraform.zip
  EOH
end

remote_file 'move_terraform_binary' do
  path '/usr/local/bin/terraform'
  source "file://#{tmp_loc}/terraform"
  owner 'root'
  group 'root'
  mode 0755
end<commit_msg>Fixes Terraform installation by overwriting existing cached files<commit_after># Use Chef cache as tmp location
tmp_loc = Chef::Config[:file_cache_path]

remote_file "#{tmp_loc}/terraform.zip" do
  source node['bubble']['terraform_download_url']
  mode '0644'
  backup false
end

bash 'unzip_terraform' do
  user 'root'
  cwd "#{tmp_loc}"
  code <<-EOH
  unzip -o terraform.zip
  EOH
end

remote_file 'move_terraform_binary' do
  path '/usr/local/bin/terraform'
  source "file://#{tmp_loc}/terraform"
  owner 'root'
  group 'root'
  mode 0755
end
{'fraction_non_alphanumeric': 0.11861137897782063, 'fraction_numerical': 0.015429122468659595, 'mean_word_length': 4.7032967032967035, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '6397119', 'n_tokens_mistral': 398, 'n_tokens_neox': 395, 'n_words': 99}