Support ubuntu xenial plugins directory
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>
This commit is contained in:
parent
81d84046bb
commit
82a00dacba
@ -1,5 +1,6 @@
|
||||
class meetbot {
|
||||
include ::httpd
|
||||
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
|
||||
@ -59,7 +60,7 @@ class meetbot {
|
||||
require => User['meetbot'],
|
||||
}
|
||||
|
||||
file { '/usr/share/pyshared/supybot/plugins/MeetBot':
|
||||
file { "${::meetbot::params::plugins_dir}/supybot/plugins/MeetBot":
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
require => [
|
||||
@ -69,7 +70,7 @@ class meetbot {
|
||||
source => '/opt/meetbot/MeetBot',
|
||||
}
|
||||
|
||||
file { '/usr/share/pyshared/supybot/plugins/Bugtracker':
|
||||
file { "${::meetbot::params::plugins_dir}/supybot/plugins/Bugtracker":
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
require => [
|
||||
|
8
manifests/params.pp
Normal file
8
manifests/params.pp
Normal file
@ -0,0 +1,8 @@
|
||||
# Class: meetbot::params
|
||||
#
|
||||
class meetbot::params {
|
||||
$plugins_dir = $::lsbdistcodename ? {
|
||||
'xenial' => '/usr/lib/python2.7/dist-packages',
|
||||
default => '/usr/share/pyshared',
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ define meetbot::site(
|
||||
$vhost_name = $::fqdn,
|
||||
$manage_index = true,
|
||||
) {
|
||||
include ::meetbot::params
|
||||
|
||||
$varlib = "/var/lib/meetbot/${name}"
|
||||
$meetbot = "/srv/meetbot-${name}"
|
||||
@ -123,7 +124,7 @@ define meetbot::site(
|
||||
File["/etc/init/${name}-meetbot.conf"]
|
||||
],
|
||||
subscribe => [
|
||||
File['/usr/share/pyshared/supybot/plugins/MeetBot'],
|
||||
File["${::meetbot::params::plugins_dir}/supybot/plugins/MeetBot"],
|
||||
File["${varlib}/ircmeeting"]
|
||||
],
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user