<commit_before>include_recipe 'aws'
include_recipe 'cassandra-dse::default'
include_recipe 'ntp::default'

['root','ec2-user'].each do |u|
	directory "home/#{u}/.aws" do
	  mode '0775'
	  action :create
	end
	template "/home/#{u}/.aws/config" do
	  source 'config.erb'
	  owner "#{u}"
	  group "#{u}"  
	  mode '0600'
	  action :create
	end
end

node['aws-tag']['tags'].each do |key,value|
	execute 'add_tags' do
		command "aws ec2 create-tags --resources $(curl http://169.254.169.254/latest/meta-data/instance-id) --tags Key=#{key},Value=#{value}"
		action :run
	end
end

#aws_resource_tag node['ec2']['instance_id'] do
#  tags(node['aws-tag']['tags'])
#  action :update
#end
<commit_msg>reverted back to old code.<commit_after>include_recipe 'aws'
include_recipe 'cassandra-dse::default'
include_recipe 'ntp::default'

	directory '/home/ec2-user/.aws' do
	  mode '0775'
	  action :create
	end
	template '/home/ec2-user/.aws/config' do
	  source 'config.erb'
	  owner 'ec2-user'
	  group 'ec2-user'  
	  mode '0600'
	  action :create
	end

node['aws-tag']['tags'].each do |key,value|
	execute 'add_tags' do
		command "aws ec2 create-tags --resources $(curl http://169.254.169.254/latest/meta-data/instance-id) --tags Key=#{key},Value=#{value}"
		action :run
	end
end

#aws_resource_tag node['ec2']['instance_id'] do
#  tags(node['aws-tag']['tags'])
#  action :update
#end

{'fraction_non_alphanumeric': 0.17976710334788937, 'fraction_numerical': 0.03566229985443959, 'mean_word_length': 4.268199233716475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '306494', 'n_tokens_mistral': 566, 'n_tokens_neox': 520, 'n_words': 116}