<commit_before>Capistrano::Configuration.instance(true).load do

  namespace :apparmor do
  	set :mysql_apparmor_conf, File.join(File.dirname(__FILE__),'usr.sbin.mysqld')
  	set :mysql_apparmor_path, "/etc/apparmor.d"

  	desc "Call tasks to setup"
    task :setup, :roles => [:mysql_master, :mysql_slave] do
    	apparmor.setup_apparmor
		  apparmor.restart
    end

    desc "Setup Apparmor to allow permission to custom directories in mysql"
    task :setup_apparmor, :roles => [:mysql_master, :mysql_slave] do
      utilities.sudo_upload_template mysql_apparmor_conf, "#{mysql_apparmor_path}/usr.sbin.mysqld", :mode => "644", :owner => "root:root"
    end

    %w(start stop restart reload).each do |t|
      desc "#{t} apparmor"
      task t.to_sym, :roles => [:mysql_master, :mysql_slave] do<commit_msg>apply apparmor to the mysqld role as well.<commit_after>Capistrano::Configuration.instance(true).load do

  namespace :apparmor do
  	set :mysql_apparmor_conf, File.join(File.dirname(__FILE__),'usr.sbin.mysqld')
  	set :mysql_apparmor_path, "/etc/apparmor.d"

  	desc "Call tasks to setup"
    task :setup do
    	apparmor.setup_apparmor
		  apparmor.restart
    end

    desc "Setup Apparmor to allow permission to custom directories in mysql"
    task :setup_apparmor, :roles => [:mysql_master, :mysql_slave, :mysqld] do
      utilities.sudo_upload_template mysql_apparmor_conf, "#{mysql_apparmor_path}/usr.sbin.mysqld", :mode => "644", :owner => "root:root"
    end

    %w(start stop restart reload).each do |t|
      desc "#{t} apparmor"
      task t.to_sym, :roles => [:mysql_master, :mysql_slave, :mysqld] do
{'fraction_non_alphanumeric': 0.1206896551724138, 'fraction_numerical': 0.003694581280788177, 'mean_word_length': 4.22508038585209, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '4140466', 'n_tokens_mistral': 602, 'n_tokens_neox': 578, 'n_words': 135}