comparison modules/mysql/manifests/server/config.pp @ 443:c6c9a2cfcfbd

Update MySQL module Fixes a problem with MariaDB and blank certificate paths
author IBBoard <dev@ibboard.co.uk>
date Mon, 08 May 2023 11:48:41 +0100
parents 668df4711671
children adf6fe9bbc17
comparison
equal deleted inserted replaced
442:2879e2d4148e 443:c6c9a2cfcfbd
32 } 32 }
33 } 33 }
34 } 34 }
35 35
36 #Debian: Creating world readable directories before installing. 36 #Debian: Creating world readable directories before installing.
37 case $::operatingsystem { 37 case $facts['os']['family'] {
38 'Debian': { 38 'Debian': {
39 if $managed_dirs { 39 if $managed_dirs {
40 $managed_dirs.each | $entry | { 40 $managed_dirs.each | $entry | {
41 $dir = $options['mysqld']["${entry}"] 41 $dir = $options['mysqld']["${entry}"]
42
42 if ( $dir and $dir != '/usr' and $dir != '/tmp' ) { 43 if ( $dir and $dir != '/usr' and $dir != '/tmp' ) {
44 $clean_dir = shell_escape($dir)
45 $clean_package_name = shell_escape($mysql::server::package_name)
46
43 exec { "${entry}-managed_dir-mkdir": 47 exec { "${entry}-managed_dir-mkdir":
44 command => "/bin/mkdir -p ${dir}", 48 command => ['/bin/mkdir', '-p', $clean_dir],
45 unless => "/usr/bin/dpkg -s ${mysql::server::package_name}", 49 unless => [['/usr/bin/dpkg', '-s', $clean_package_name]],
46 notify => Exec["${entry}-managed_dir-chmod"], 50 notify => Exec["${entry}-managed_dir-chmod"],
47 } 51 }
52
48 exec { "${entry}-managed_dir-chmod": 53 exec { "${entry}-managed_dir-chmod":
49 command => "/bin/chmod 777 ${dir}", 54 command => ['/bin/chmod', '777', $clean_dir],
50 refreshonly => true, 55 refreshonly => true,
51 } 56 }
52 } 57 }
53 } 58 }
54 } 59 }
80 mode => '0755', 85 mode => '0755',
81 } 86 }
82 } 87 }
83 } 88 }
84 } 89 }
85
86 if $options['mysqld']['ssl-disable'] {
87 notify { 'ssl-disable':
88 message => 'Disabling SSL is evil! You should never ever do this except
89 if you are forced to use a mysql version compiled without SSL support',
90 }
91 }
92 } 90 }