Skip to content

Commit

Permalink
Merge pull request #654 from NoodlesNZ/logbindir
Browse files Browse the repository at this point in the history
Check for full path for log-bin to stop puppet from managing directory “."
  • Loading branch information
igalic committed Feb 24, 2015
2 parents efcf2ed + dc71156 commit e323f69
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions manifests/server/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@
$logbin = pick($options['mysqld']['log-bin'], $options['mysqld']['log_bin'], false)

if $logbin {
$logbindir = mysql_dirname($logbin)
file { $logbindir:
ensure => directory,
mode => '0755',
owner => $options['mysqld']['user'],
group => $options['mysqld']['user'],
$logbindir = dirname($logbin)

#Stop puppet from managing directory if just a filename/prefix is specified
if $logbindir != '.' {
file { $logbindir:
ensure => directory,
mode => '0755',
owner => $options['mysqld']['user'],
group => $options['mysqld']['user'],
}
}
}

Expand Down

0 comments on commit e323f69

Please sign in to comment.