system-config/modules/openstack_project/manifests/codesearch.pp
Paul Belanger 58148d3f21 Subscribe to project_config for create-hound-config
In an effort to reduce how often this runs.  A future patch would add
better support into jeepyb to detect if the file actually changes, if
so return a different return code and have puppet only notify the
hound servce to reload.

Change-Id: I29c7e41ee0e605d290dc360db10149e157d09a0d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-03-03 15:01:22 -05:00

37 lines
815 B
Puppet

# Class to configure hound on a node.
class openstack_project::codesearch (
$project_config_repo,
) {
class { 'project_config':
url => $project_config_repo,
}
class { 'hound':
manage_config => false,
}
include ::jeepyb
include ::logrotate
include ::pip
file { '/home/hound/config.json':
ensure => 'present',
}
exec { 'create-hound-config':
command => 'create-hound-config',
path => '/bin:/usr/bin:/usr/local/bin',
environment => "PROJECTS_YAML=${::project_config::jeepyb_project_file}",
user => 'hound',
cwd => '/home/hound',
require => [
$::project_config::config_dir,
File['/home/hound'],
],
notify => Service['hound'],
refreshonly => true,
subscribe => Class['project_config'],
}
}