<commit_before>#
# Cookbook Name:: |{ .Cookbook.Name }|
# Recipe :: |{ .Name }|
#
# Copyright |{ .Cookbook.Year }|, Rackspace
#

include_recipe 'mysql-multi::mysql_|{ .Role }|'

|{ if ne .Openfor "" }|
search_string = "chef_environment:#{node.chef_environment} AND tags:|{ .Openfor }|"
search_add_iptables_rules(
  search_string,
  'INPUT',
  "-m tcp -p tcp --dport #{node['mysql']['port']} -j ACCEPT",
  70,
  'access to mysql'
)
|{ end }|

|{ if ne .Database "" }|
conn = {
  host:  'localhost',
  username: 'root',
  password: node['mysql']['server_<PASSWORD>']
}

|{ if ne .Databag "" }|
mysql_creds = Chef::EncryptedDataBagItem.load(
  '|{ .Databag }|',
  node.chef_environment
)

mysql_database |{ .QString .Database }| do
  connection conn
  action :create<commit_msg>added yet another missing recipe<commit_after>#
# Cookbook Name:: |{ .Cookbook.Name }|
# Recipe :: |{ .Name }|
#
# Copyright |{ .Cookbook.Year }|, Rackspace
#

include_recipe 'mysql-multi::mysql_|{ .Role }|'

|{ if ne .Openfor "" }|
search_string = "chef_environment:#{node.chef_environment} AND tags:|{ .Openfor }|"
search_add_iptables_rules(
  search_string,
  'INPUT',
  "-m tcp -p tcp --dport #{node['mysql']['port']} -j ACCEPT",
  70,
  'access to mysql'
)
|{ end }|

|{ if ne .Database "" }|
conn = {
  host:  'localhost',
  username: 'root',
  password: node['mysql']['server_<PASSWORD>']
}

include_recipe 'database::mysql'
|{ if ne .Databag "" }|
mysql_creds = Chef::EncryptedDataBagItem.load(
  '|{ .Databag }|',
  node.chef_environment
)

mysql_database |{ .QString .Database }| do
  connection conn
  action :create
{'fraction_non_alphanumeric': 0.19225967540574282, 'fraction_numerical': 0.0024968789013732834, 'mean_word_length': 4.29042904290429, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6710125', 'n_tokens_mistral': 629, 'n_tokens_neox': 622, 'n_words': 127}