summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-07 07:48:19 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-07 07:48:19 -0300
commit5fe00a03f3d34d3a801bd19dfa1740cf2d174f1b (patch)
treeb54f62fee7711709fdf53491f49bef1fa6d8cbf0
parent3c942ca89ea5633054725663cc6cad73168917fd (diff)
downloadpuppet-database-5fe00a03f3d34d3a801bd19dfa1740cf2d174f1b.tar.gz
puppet-database-5fe00a03f3d34d3a801bd19dfa1740cf2d174f1b.tar.bz2
Ensure mysql config folder exists
-rw-r--r--manifests/config.pp8
1 files changed, 8 insertions, 0 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index 2110efc..af86988 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -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'],
}
}