diff modules/mysql/manifests/server/installdb.pp @ 389:668df4711671

Update MySQL modules
author IBBoard <dev@ibboard.co.uk>
date Mon, 03 Jan 2022 17:16:21 +0000
parents 48d3a1948e4d
children
line wrap: on
line diff
--- a/modules/mysql/manifests/server/installdb.pp	Mon Jan 03 17:15:14 2022 +0000
+++ b/modules/mysql/manifests/server/installdb.pp	Mon Jan 03 17:16:21 2022 +0000
@@ -1,19 +1,18 @@
-# @summary 
+# @summary
 #   Builds initial databases on installation.
 #
 # @api private
 #
 class mysql::server::installdb {
-  $options = $mysql::server::options
+  $options = $mysql::server::_options
 
   if $mysql::server::package_manage {
-
     # Build the initial databases.
-    $mysqluser = $mysql::server::options['mysqld']['user']
-    $datadir = $mysql::server::options['mysqld']['datadir']
-    $basedir = $mysql::server::options['mysqld']['basedir']
+    $mysqluser = $mysql::server::_options['mysqld']['user']
+    $datadir = $mysql::server::_options['mysqld']['datadir']
+    $basedir = $mysql::server::_options['mysqld']['basedir']
     $config_file = $mysql::server::config_file
-    $log_error = $mysql::server::options['mysqld']['log-error']
+    $log_error = $mysql::server::_options['mysqld']['log-error']
 
     if $mysql::server::manage_config_file and $config_file != $mysql::params::config_file {
       $_config_file=$config_file
@@ -21,15 +20,15 @@
       $_config_file=undef
     }
 
-  if $options['mysqld']['log-error'] {
-    file { $options['mysqld']['log-error']:
-      ensure => present,
-      owner  => $mysqluser,
-      group  => $::mysql::server::mysql_group,
-      mode   => 'u+rw',
-      before => Mysql_datadir[ $datadir ],
+    if $options['mysqld']['log-error'] {
+      file { $options['mysqld']['log-error']:
+        ensure => file,
+        owner  => $mysqluser,
+        group  => $mysql::server::mysql_group,
+        mode   => 'u+rw',
+        before => Mysql_datadir[$datadir],
+      }
     }
-  }
 
     mysql_datadir { $datadir:
       ensure              => 'present',
@@ -46,5 +45,4 @@
       }
     }
   }
-
 }