diff --git a/manifests/server/config.pp b/manifests/server/config.pp index 486af7557..d13a1edbe 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -136,7 +136,7 @@ exec { 'fix dbpath permissions': command => "chown -R ${user}:${group} ${dbpath}", path => ['/usr/bin', '/bin'], - onlyif => "find ${dbpath} -not -user ${user} -o -not -group ${group} -print -quit | grep -q '.*'", + onlyif => "find ${dbpath} -not -user ${user} -o -not -group ${group} -quit | grep -q '.*'", subscribe => File[$dbpath], } } diff --git a/spec/classes/server_spec.rb b/spec/classes/server_spec.rb index ffeab1355..c9ccf5a43 100644 --- a/spec/classes/server_spec.rb +++ b/spec/classes/server_spec.rb @@ -280,7 +280,7 @@ is_expected.to contain_exec('fix dbpath permissions'). with_command('chown -R foo:bar /var/lib/mongodb'). with_path(['/usr/bin', '/bin']). - with_onlyif("find /var/lib/mongodb -not -user foo -o -not -group bar -print -quit | grep -q '.*'"). + with_onlyif("find /var/lib/mongodb -not -user foo -o -not -group bar -quit | grep -q '.*'"). that_subscribes_to('File[/var/lib/mongodb]') end end