system-config/modules/gerritbot/manifests/init.pp
Paul Belanger 57d13bacfd Additional puppet-lint reformatting
Change-Id: I49e63755b8b5bf60673cf37b62371b3f299e3bbe
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-on: https://review.openstack.org/14971
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2012-10-29 19:21:24 +00:00

80 lines
1.7 KiB
Puppet

class gerritbot(
$nick,
$password,
$server,
$user,
$vhost_name
) {
include pip
package { 'gerritbot':
ensure => present, # Pip upgrade is not working
provider => pip,
require => Class['pip']
}
file { '/etc/init.d/gerritbot':
ensure => present,
group => 'root',
mode => '0555',
owner => 'root',
require => Package['gerritbot'],
source => 'puppet:///modules/gerritbot/gerritbot.init',
}
service { 'gerritbot':
ensure => running,
enable => true,
hasrestart => true,
require => File['/etc/init.d/gerritbot'],
subscribe => [
Package['gerritbot'],
File['/etc/gerritbot/gerritbot.config'],
File['/etc/gerritbot/channel_config.yaml']
],
}
file { '/etc/gerritbot':
ensure => directory,
}
file { '/var/log/gerritbot':
ensure => directory,
group => 'gerrit2',
mode => '0775',
owner => 'root',
}
file { '/etc/gerritbot/channel_config.yaml':
ensure => present,
group => 'gerrit2',
mode => '0440',
owner => 'root',
replace => true,
require => User['gerrit2'],
source => 'puppet:///modules/gerritbot/gerritbot_channel_config.yaml',
}
file { '/etc/gerritbot/logging.config':
ensure => present,
group => 'gerrit2',
mode => '0440',
owner => 'root',
replace => true,
require => User['gerrit2'],
source => 'puppet:///modules/gerritbot/logging.config',
}
file { '/etc/gerritbot/gerritbot.config':
ensure => present,
content => template('gerritbot/gerritbot.config.erb'),
group => 'gerrit2',
mode => '0440',
owner => 'root',
replace => true,
require => User['gerrit2'],
}
}
# vim:sw=2:ts=2:expandtab:textwidth=79