diff --git a/vsroom/manifests/init.pp b/vsroom/manifests/init.pp index d10cda6..45cf372 100644 --- a/vsroom/manifests/init.pp +++ b/vsroom/manifests/init.pp @@ -1,65 +1,15 @@ -# Install standalone vsroom. +# Install VSRoom. # -# === Global variables +# === Parameters # # $vsroom_authurl: -# Authentication path. Defaults to "../common/auth_credentials.php". +# Authentication path. Defaults to "/collab/?action=authcredentials". # # $vsroom_boshurl: # XMPP BOSH path. Defaults to "/bosh/". # -class vsroom { - - if !$vsroom_authurl { - $vsroom_authurl = "../common/auth_credentials.php" - } - if !$vsroom_boshurl { - $vsroom_boshurl = "/bosh/" - } - - class { "vsroom::common": - vsroom_authurl => $vsroom_authurl, - vsroom_boshurl => $vsroom_boshurl, - } - -} - - -# Install vsroom with collab authentication. -# -class vsroom::collab { - - if !$vsroom_authurl { - $vsroom_authurl = "/collab/auth_credentials.php" - } - if !$vsroom_boshurl { - $vsroom_boshurl = "/bosh/" - } - - class { "vsroom::common": - vsroom_authurl => $vsroom_authurl, - vsroom_boshurl => $vsroom_boshurl, - } - - file { "/srv/wikis/collab/htdocs/auth_credentials.php": - ensure => present, - mode => "0660", - owner => "collab", - group => "collab", - seltype => "httpd_sys_rw_content_t", - source => "${vsroom::common::htdocs}/common/auth_credentials.php", - require => [ - File["/srv/wikis/collab/htdocs"], - Python::Setup::Install["/usr/local/src/vsroom"], - ], - } - -} - - -# Install common vsroom components. -# -class vsroom::common($vsroom_authurl, $vsroom_boshurl) { +class vsroom($vsroom_authurl="/collab/?action=authcredentials", + $vsroom_boshurl="/bosh/") { case $::operatingsystem { "centos","redhat": {