summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-04-12 16:06:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-04-12 16:06:57 -0300
commit6e67ade0e843ff1567f99b9cba423fe88373016c (patch)
treeec0ce1bd36a08f0d0575107ec5fd73596fecf530 /manifests
parent4a831eaaa1673a54c8224cf5da66165a1a227e12 (diff)
downloadpuppet-database-6e67ade0e843ff1567f99b9cba423fe88373016c.tar.gz
puppet-database-6e67ade0e843ff1567f99b9cba423fe88373016c.tar.bz2
Fix section variable
Diffstat (limited to 'manifests')
-rw-r--r--manifests/config.pp19
1 files changed, 11 insertions, 8 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index f931a45..887a7f4 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -5,15 +5,18 @@ define database::config(
) {
# 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',
- }
+ $real_section = $section ? {
+ '' => $implementation ? {
+ 'mysql-server' => $::lsbdistid ? {
+ 'Ubuntu' => 'mysql.conf.d',
+ 'Debian' => 'mariadb.conf.d',
+ },
+ 'mariadb-server' => 'mariadb.conf.d',
+ },
+ default => $section,
+ }
- file { "/etc/mysql/${section}/${name}.cnf":
+ file { "/etc/mysql/${real_section}/${name}.cnf":
ensure => $ensure,
owner => root,
group => root,