]> git.openstreetmap.org Git - chef.git/commitdiff
Don't try and patch apparmor policy unless apparmor is active
authorTom Hughes <tom@compton.nu>
Wed, 29 Jun 2022 09:43:03 +0000 (10:43 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 29 Jun 2022 09:43:03 +0000 (10:43 +0100)
cookbooks/mysql/recipes/default.rb

index 00334af00216a28dea52ee3aa154c5d2c3c9b2c4..aad3a7683d2f5833c0ce0bacb5c898bd69016282 100644 (file)
@@ -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"