
Looks like the location of plugins directory has changed in ubuntu-xenial. Update manifiest to support both xenial and trusty. Update service to subscribe to /opt/meetbot this way we don't need to know which plugins directory is needed when on xenial or trusty. Change-Id: I70a06093bbb1119aed52627f2a4bf1d07b74cd5b Signed-off-by: Paul Belanger <pabelanger@redhat.com>
85 lines
1.8 KiB
Puppet
85 lines
1.8 KiB
Puppet
class meetbot {
|
|
include ::httpd
|
|
include ::meetbot::params
|
|
|
|
# The Apache mod_version module only needs to be enabled on Ubuntu 12.04
|
|
# as it comes compiled and enabled by default on newer OS, including CentOS
|
|
if !defined(Httpd::Mod['version']) and $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '12.04' {
|
|
httpd::mod { 'version':
|
|
ensure => present
|
|
}
|
|
}
|
|
|
|
vcsrepo { '/opt/meetbot':
|
|
ensure => latest,
|
|
provider => git,
|
|
source => 'https://git.openstack.org/openstack-infra/meetbot',
|
|
}
|
|
|
|
vcsrepo { '/opt/ubuntu_supybot_plugins':
|
|
ensure => present,
|
|
provider => bzr,
|
|
require => [
|
|
Package['bzr'],
|
|
],
|
|
source => 'lp:ubuntu-bots'
|
|
}
|
|
|
|
user { 'meetbot':
|
|
gid => 'meetbot',
|
|
home => '/var/lib/meetbot',
|
|
shell => '/usr/sbin/nologin',
|
|
system => true,
|
|
require => Group['meetbot'],
|
|
}
|
|
|
|
group { 'meetbot':
|
|
ensure => present,
|
|
}
|
|
|
|
$packages = [
|
|
'supybot',
|
|
'bzr',
|
|
'python-launchpadlib',
|
|
'python-soappy',
|
|
'python-twisted'
|
|
]
|
|
|
|
package { $packages:
|
|
ensure => present,
|
|
}
|
|
|
|
package { 'irclog2html':
|
|
ensure => 'present',
|
|
provider => openstack_pip,
|
|
}
|
|
|
|
file { '/var/lib/meetbot':
|
|
ensure => directory,
|
|
owner => 'meetbot',
|
|
require => User['meetbot'],
|
|
}
|
|
|
|
file { "${::meetbot::params::plugins_dir}/supybot/plugins/MeetBot":
|
|
ensure => directory,
|
|
recurse => true,
|
|
require => [
|
|
Package['supybot'],
|
|
Vcsrepo['/opt/meetbot']
|
|
],
|
|
source => '/opt/meetbot/MeetBot',
|
|
}
|
|
|
|
file { "${::meetbot::params::plugins_dir}/supybot/plugins/Bugtracker":
|
|
ensure => directory,
|
|
recurse => true,
|
|
require => [
|
|
Package['supybot'],
|
|
Vcsrepo['/opt/ubuntu_supybot_plugins']
|
|
],
|
|
source => '/opt/ubuntu_supybot_plugins/Bugtracker',
|
|
}
|
|
}
|
|
|
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|