Skip to content

Commit

Permalink
better fix double declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
elfranne committed May 9, 2019
1 parent d2ad637 commit abd4e3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions manifests/server/managed_dirs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#Debian: Fix permission on directories
if $managed_dirs {
$managed_dirs_path = $managed_dirs.map |$path| { $options['mysqld']["${path}"] }
$managed_dirs.each | $entry | {
$dir = $options['mysqld']["${entry}"]
if ( $dir and $dir != '/usr' and $dir != '/tmp' ) {
Expand All @@ -30,8 +31,8 @@
if $logbin {
$logbindir = dirname($logbin)

#Stop puppet from managing directory if just a filename/prefix is specified or is datadir
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
if ($logbindir != '.' and !($logbindir in $managed_dirs_path)) {
file { $logbindir:
ensure => directory,
mode => '0700',
Expand Down

0 comments on commit abd4e3b

Please sign in to comment.