Make sure global worker defs only done once

This commit makes sure that all the global definitions on the worker
class are only defined once. If we don't check for the previous
definition when running with multiple workers on a single node things
will fail.

Change-Id: I947d61f455778fe41d0a4723c99d029272d2155d
This commit is contained in:
Matthew Treinish 2016-07-26 15:22:12 -04:00
parent a2e16a0f58
commit 0e55e618ae
1 changed files with 9 additions and 5 deletions

View File

@ -26,13 +26,17 @@ define subunit2sql::worker (
) {
$suffix = "-${name}"
file { '/etc/logstash/':
ensure => absent,
if ! defined(File['/etc/logstash']) {
file { '/etc/logstash/':
ensure => absent,
}
}
user { 'subunit':
ensure => present,
system => true,
if ! defined(User['subunit']) {
user { 'subunit':
ensure => present,
system => true,
}
}
if ! defined(File['/etc/subunit2sql']) {