Correct elastic-recheck Puppet dependencies
* modules/elastic_recheck/files/elastic-recheck.init: Update the daemon invocation now that it has an executable entrypoints wrapper. * modules/elastic_recheck/manifests/init.pp: Correct the Puppet dependency tree sufficiently to be able to apply the manifest successfully. Change-Id: Ib018564e66c29d73b30aaf50c9306dc6d67ba2b2
This commit is contained in:
parent
9f6762830c
commit
9caae512f2
@ -17,9 +17,8 @@
|
|||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
DESC="Elastic Recheck"
|
DESC="Elastic Recheck"
|
||||||
NAME=elastic-recheck
|
NAME=elastic-recheck
|
||||||
#TODO: rework the following two lines once we have executable entrypoints
|
DAEMON=/usr/local/bin/$NAME
|
||||||
DAEMON=/usr/bin/python
|
DAEMON_ARGS=/etc/$NAME/$NAME.conf
|
||||||
DAEMON_ARGS="/opt/$NAME/elastic_recheck/bot.py /etc/$NAME/$NAME.conf"
|
|
||||||
PIDFILE=/var/run/$NAME/$NAME.pid
|
PIDFILE=/var/run/$NAME/$NAME.pid
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
USER=recheck
|
USER=recheck
|
||||||
|
@ -34,10 +34,7 @@ class elastic_recheck (
|
|||||||
home => '/var/run/elastic-recheck',
|
home => '/var/run/elastic-recheck',
|
||||||
shell => '/bin/false',
|
shell => '/bin/false',
|
||||||
gid => 'recheck',
|
gid => 'recheck',
|
||||||
require => [
|
require => Group['recheck'],
|
||||||
Group['recheck'],
|
|
||||||
File['/var/run/elastic-recheck'],
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vcsrepo { '/opt/elastic-recheck':
|
vcsrepo { '/opt/elastic-recheck':
|
||||||
@ -58,24 +55,27 @@ class elastic_recheck (
|
|||||||
}
|
}
|
||||||
|
|
||||||
file { '/var/run/elastic-recheck':
|
file { '/var/run/elastic-recheck':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
owner => 'recheck',
|
owner => 'recheck',
|
||||||
group => 'recheck',
|
group => 'recheck',
|
||||||
|
require => User['recheck'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/var/log/elastic-recheck':
|
file { '/var/log/elastic-recheck':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
owner => 'recheck',
|
owner => 'recheck',
|
||||||
group => 'recheck',
|
group => 'recheck',
|
||||||
|
require => User['recheck'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/elastic-recheck':
|
file { '/etc/elastic-recheck':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
owner => 'recheck',
|
owner => 'recheck',
|
||||||
group => 'recheck',
|
group => 'recheck',
|
||||||
|
require => User['recheck'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/elastic-recheck/elastic-recheck.conf':
|
file { '/etc/elastic-recheck/elastic-recheck.conf':
|
||||||
@ -84,21 +84,26 @@ class elastic_recheck (
|
|||||||
owner => 'recheck',
|
owner => 'recheck',
|
||||||
group => 'recheck',
|
group => 'recheck',
|
||||||
content => template('elastic_recheck/elastic-recheck.conf.erb'),
|
content => template('elastic_recheck/elastic-recheck.conf.erb'),
|
||||||
|
require => File['/etc/elastic-recheck'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/elastic-recheck/recheckwatchbot.yaml':
|
file { '/etc/elastic-recheck/recheckwatchbot.yaml':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
mode => '0640',
|
mode => '0640',
|
||||||
owner => 'recheck',
|
owner => 'recheck',
|
||||||
group => 'recheck',
|
group => 'recheck',
|
||||||
source => 'puppet:///modules/elastic_recheck/recheckwatchbot.yaml',
|
source => 'puppet:///modules/elastic_recheck/recheckwatchbot.yaml',
|
||||||
|
require => File['/etc/elastic-recheck'],
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(clarkb) put queries.json somewhere else.
|
# TODO(clarkb) put queries.json somewhere else.
|
||||||
file { '/etc/elastic-recheck/queries.json':
|
file { '/etc/elastic-recheck/queries.json':
|
||||||
ensure => link,
|
ensure => link,
|
||||||
target => '/opt/elastic-recheck/queries.json',
|
target => '/opt/elastic-recheck/queries.json',
|
||||||
require => Vcsrepo['/opt/elastic-recheck'],
|
require => [
|
||||||
|
Vcsrepo['/opt/elastic-recheck'],
|
||||||
|
File['/etc/elastic-recheck'],
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { $gerrit_ssh_private_key:
|
file { $gerrit_ssh_private_key:
|
||||||
@ -107,6 +112,7 @@ class elastic_recheck (
|
|||||||
owner => 'recheck',
|
owner => 'recheck',
|
||||||
group => 'recheck',
|
group => 'recheck',
|
||||||
content => $gerrit_ssh_private_key_contents,
|
content => $gerrit_ssh_private_key_contents,
|
||||||
|
require => User['recheck'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/init.d/elastic-recheck':
|
file { '/etc/init.d/elastic-recheck':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user