]> gitweb.fluxo.info Git - puppet-database.git/commitdiff
Check if mysql config folder is already defined
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jun 2018 10:53:48 +0000 (07:53 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jun 2018 10:53:48 +0000 (07:53 -0300)
manifests/config.pp

index 45fa00359054da19070275d69ada55b442a6aa52..491e81fa956fe17bb8198c09e4d23ce4dd71e389 100644 (file)
@@ -27,11 +27,13 @@ define database::config(
     ensure => absent,
   }
 
-  file { "/etc/mysql/${real_section}":
-    ensure => directory,
-    owner  => root,
-    group  => root,
-    mode   => '0755',
+  if !defined(File["/etc/mysql/${real_section}") {
+    file { "/etc/mysql/${real_section}":
+      ensure => directory,
+      owner  => root,
+      group  => root,
+      mode   => '0755',
+    }
   }
 
   file { "/etc/mysql/${real_section}/${order}-${name}.cnf":