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

index 2110efc42c9928b6e8b3515f96de429fd013ddf8..af86988ccc3eb5e2be68f66446e610c5559514a9 100644 (file)
@@ -27,12 +27,20 @@ define database::config(
     ensure => absent,
   }
 
+  file { "/etc/mysql/${real_section}":
+    ensure => directory,
+    owner  => root,
+    group  => root,
+    mode   => '0755',
+  }
+
   file { "/etc/mysql/${real_section}/${order}-${name}.cnf":
     ensure  => $ensure,
     owner   => root,
     group   => root,
     mode    => '0644',
     content => "[mysqld]\n${name} = ${value}\n",
+    require => File["/etc/mysql/${real_section}",
     notify  => Service['mysql'],
   }
 }