summaryrefslogtreecommitdiff
path: root/manifests/config.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/config.pp')
-rw-r--r--manifests/config.pp12
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index f1d45be..2bda473 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -1,8 +1,18 @@
define database::config(
$value,
- $section = 'conf.d',
+ $section = '',
$ensure = 'present'
) {
+ # Guess section based on operating system and implementation
+ $implementation = $::mysql::server::implementation
+ $section = $implementation {
+ 'mysql-server' => $::lsbdistid ? {
+ 'Ubuntu' => 'mysql.conf.d',
+ 'Debian' => 'mariadb.conf.d',
+ },
+ 'mariadb-server' => 'mariadb.conf.d',
+ }
+
file { "/etc/mysql/${section}/${name}.cnf":
ensure => $ensure,
owner => root,