system-config/modules/statusbot/manifests/init.pp
James E. Blair 37e88867a8 Don't automatically run meetbot/statusbot.
Change-Id: I8facfa48113d27fd18e700730a7a27a666bc2c40
Reviewed-on: https://review.openstack.org/28059
Reviewed-by: Jesse Keating <jesse.keating@rackspace.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-05-10 17:26:40 +00:00

102 lines
2.2 KiB
Puppet

# == Class: statusbot
#
class statusbot(
$nick = '',
$password = '',
$server = '',
$channels = '',
$auth_nicks = '',
$wiki_user = '',
$wiki_password = '',
$wiki_url = '',
$wiki_pageid = '',
) {
user { 'statusbot':
ensure => present,
home => '/home/statusbot',
shell => '/bin/bash',
gid => 'statusbot',
managehome => true,
require => Group['statusbot'],
}
group { 'statusbot':
ensure => present,
}
vcsrepo { '/opt/statusbot':
ensure => latest,
provider => git,
revision => 'master',
source => 'https://github.com/openstack-infra/statusbot.git',
}
exec { 'install_statusbot' :
command => 'python setup.py install',
cwd => '/opt/statusbot',
path => '/bin:/usr/bin',
refreshonly => true,
subscribe => Vcsrepo['/opt/statusbot'],
}
file { '/etc/init.d/statusbot':
ensure => present,
group => 'root',
mode => '0555',
owner => 'root',
require => Vcsrepo['/opt/statusbot'],
source => 'puppet:///modules/statusbot/statusbot.init',
}
service { 'statusbot':
enable => true,
hasrestart => true,
require => File['/etc/init.d/statusbot'],
subscribe => [
Vcsrepo['/opt/statusbot'],
File['/etc/statusbot/statusbot.config'],
],
}
file { '/etc/statusbot':
ensure => directory,
}
file { '/var/log/statusbot':
ensure => directory,
owner => 'statusbot',
group => 'statusbot',
mode => '0775',
}
file { '/var/run/statusbot':
ensure => directory,
owner => 'statusbot',
group => 'statusbot',
mode => '0775',
}
file { '/etc/statusbot/logging.config':
ensure => present,
group => 'statusbot',
mode => '0440',
owner => 'root',
replace => true,
require => User['statusbot'],
source => 'puppet:///modules/statusbot/logging.config',
}
file { '/etc/statusbot/statusbot.config':
ensure => present,
content => template('statusbot/statusbot.config.erb'),
group => 'statusbot',
mode => '0440',
owner => 'root',
replace => true,
require => User['statusbot'],
}
}
# vim:sw=2:ts=2:expandtab:textwidth=79