Skip to content

Commit

Permalink
(CAT-2100) Make sure the '/var/log/mysql' directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamshinde360 committed Oct 16, 2024
1 parent bd9ada8 commit b14a956
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
'9' => 'ruby-mysql2', # stretch
'10' => 'ruby-mysql2', # buster
'11' => 'ruby-mysql2', # bullseye
'12' => 'ruby-mysql2', # bookworm
'16.04' => 'ruby-mysql', # xenial
'18.04' => 'ruby-mysql2', # bionic
'20.04' => 'ruby-mysql2', # focal
Expand Down
7 changes: 7 additions & 0 deletions manifests/server/installdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$basedir = $mysql::server::_options['mysqld']['basedir']
$config_file = $mysql::server::config_file
$log_error = $mysql::server::_options['mysqld']['log-error']
$log_dir = '/var/log/mysql'

if $mysql::server::manage_config_file and $config_file != $mysql::params::config_file {
$_config_file=$config_file
Expand All @@ -30,6 +31,12 @@
}
}

file { $log_dir:
ensure => 'directory',
owner => $mysqluser,

Check warning on line 36 in manifests/server/installdb.pp

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

indentation of => is not properly aligned (expected in column 14, but found it in column 13) (check: arrow_alignment)

Check warning on line 36 in manifests/server/installdb.pp

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

indentation of => is not properly aligned (expected in column 14, but found it in column 13) (check: arrow_alignment)
group => $mysql::server::mysql_group,
}

mysql_datadir { $datadir:
ensure => 'present',
datadir => $datadir,
Expand Down

0 comments on commit b14a956

Please sign in to comment.