Remove unnecessary use of logstash::indexer from subunit_worker

Previously the subunit2sql worker.pp was including the
logstash::indexer class, but this was really only done for the
/etc/logstash dir which is where the worker puts all it's files. This
commit corrects this by just ensuring the directory exists instead of
importing the other class which includes a lot of other unnecessary
things.

Change-Id: I3f00d1bb443ee0f1b2a8e9d393f46a7e9ebf148a
This commit is contained in:
Matthew Treinish 2014-11-18 18:50:39 -05:00
parent 35066b74a2
commit d2e09c5876
2 changed files with 13 additions and 4 deletions

View File

@ -35,6 +35,7 @@ $elasticsearch_clients = [
'logstash-worker18.openstack.org',
'logstash-worker19.openstack.org',
'logstash-worker20.openstack.org',
'subunit-worker01.openstack.org',
]
#

View File

@ -21,7 +21,15 @@ define subunit2sql::worker (
) {
$suffix = "-${name}"
include logstash::indexer
if ! defined(File['/etc/logstash']) {
file { '/etc/logstash':
ensure => directory,
owner => 'logstash',
group => 'logstash',
mode => '0644',
}
}
if ! defined(File['/etc/logstash/subunit2sql.conf']) {
file { '/etc/logstash/subunit2sql.conf':
ensure => present,
@ -29,7 +37,7 @@ define subunit2sql::worker (
group => 'root',
mode => '0555',
content => template('subunit2sql/subunit2sql.conf.erb'),
require => Class['logstash::indexer'],
require => File['/etc/logstash'],
}
}
@ -39,7 +47,7 @@ define subunit2sql::worker (
group => 'root',
mode => '0555',
source => $config_file,
require => Class['logstash::indexer'],
require => File['/etc/logstash'],
}
file { "/etc/init.d/jenkins-subunit-worker${suffix}":
@ -59,7 +67,7 @@ define subunit2sql::worker (
hasrestart => true,
subscribe => File["/etc/logstash/jenkins-subunit-worker${suffix}.yaml"],
require => [
Class['logstash::indexer'],
File['/etc/logstash'],
File["/etc/init.d/jenkins-subunit-worker${suffix}"],
],
}