We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f46aa3a commit 1226228Copy full SHA for 1226228
manifests/server/managed_dirs.pp
@@ -11,6 +11,7 @@
11
12
#Debian: Fix permission on directories
13
if $managed_dirs {
14
+ $managed_dirs_path = $managed_dirs.map |$path| { $options['mysqld']["${path}"] }
15
$managed_dirs.each | $entry | {
16
$dir = $options['mysqld']["${entry}"]
17
if ( $dir and $dir != '/usr' and $dir != '/tmp' ) {
@@ -30,8 +31,8 @@
30
31
if $logbin {
32
$logbindir = dirname($logbin)
33
- #Stop puppet from managing directory if just a filename/prefix is specified or is datadir
34
- if ($logbindir != '.' and $logbindir != $mysql::server::options['mysqld']['datadir'] ) {
+ #Stop puppet from managing directory if just a filename/prefix is specified or is not already managed
35
+ if ($logbindir != '.' and !($logbindir in $managed_dirs_path)) {
36
file { $logbindir:
37
ensure => directory,
38
mode => '0700',
0 commit comments