system-config/modules/gerritbot/manifests/init.pp
Matthew Wagoner 4f433a021f Clean up of minor puppet-lint warnings.
Mostly documentation and parameterised class parameter complaints.

Change-Id: I5b3ffa4ad3f707f385165c2d86c891c6bd4c1ae0
Reviewed-on: https://review.openstack.org/16901
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-11-26 20:55:57 +00:00

82 lines
1.8 KiB
Puppet

# == Class: gerritbot
#
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