From 3a28a7d7ea1e90077792b489dfef09b0fab48f1e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 29 Jun 2022 10:43:03 +0100 Subject: [PATCH] Don't try and patch apparmor policy unless apparmor is active --- cookbooks/mysql/recipes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/mysql/recipes/default.rb b/cookbooks/mysql/recipes/default.rb index 00334af00..aad3a7683 100644 --- a/cookbooks/mysql/recipes/default.rb +++ b/cookbooks/mysql/recipes/default.rb @@ -46,6 +46,7 @@ template "/etc/apparmor.d/local/usr.sbin.mysqld" do group "root" mode "644" notifies :restart, "service[apparmor]" + only_if { ::Dir.exist?("/sys/kernel/security/apparmor") } end package "libdbd-mysql-perl" -- 2.39.5