Added support for collab auth in vsroom, templated config.json
Class vsroom::collab installs auth_credentials.php in collab htdocs and sets the authUrl variable in config.json accordingly.
This commit is contained in:
parent
b1401f4c04
commit
fabf5e90cb
3 changed files with 56 additions and 8 deletions
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"authUrl": "../common/auth_credentials.php",
|
|
||||||
"boshUrl": "/bosh/"
|
|
||||||
}
|
|
|
@ -1,7 +1,57 @@
|
||||||
# Install vsroom.
|
# Install standalone vsroom.
|
||||||
|
#
|
||||||
|
# === Global variables
|
||||||
|
#
|
||||||
|
# $vsroom_authurl:
|
||||||
|
# Authentication path. Defaults to "../common/auth_credentials.php".
|
||||||
|
#
|
||||||
|
# $vsroom_boshurl:
|
||||||
|
# XMPP BOSH path. Defaults to "/bosh/".
|
||||||
#
|
#
|
||||||
class vsroom {
|
class vsroom {
|
||||||
|
|
||||||
|
if !$vsroom_authurl {
|
||||||
|
$vsroom_authurl = "../common/auth_credentials.php"
|
||||||
|
}
|
||||||
|
if !$vsroom_boshurl {
|
||||||
|
$vsroom_boshurl = "/bosh/"
|
||||||
|
}
|
||||||
|
|
||||||
|
include vsroom::common
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Install vsroom with collab authentication.
|
||||||
|
#
|
||||||
|
class vsroom::collab {
|
||||||
|
|
||||||
|
if !$vsroom_authurl {
|
||||||
|
$vsroom_authurl = "/collab/auth_credentials.php"
|
||||||
|
}
|
||||||
|
if !$vsroom_boshurl {
|
||||||
|
$vsroom_boshurl = "/bosh/"
|
||||||
|
}
|
||||||
|
|
||||||
|
include vsroom::common
|
||||||
|
|
||||||
|
file { "/srv/wikis/collab/htdocs/auth_credentials.php":
|
||||||
|
ensure => present,
|
||||||
|
mode => "0660",
|
||||||
|
owner => "collab",
|
||||||
|
group => "collab",
|
||||||
|
source => "/usr/share/vsroom/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 {
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
centos: {
|
centos: {
|
||||||
case $operatingsystemrelease {
|
case $operatingsystemrelease {
|
||||||
|
@ -75,9 +125,7 @@ class vsroom {
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
source => [ "puppet:///files/vsroom/config.json.${fqdn}",
|
content => template("vsroom/config.json.erb"),
|
||||||
"puppet:///files/vsroom/config.json",
|
|
||||||
"puppet:///modules/vsroom/config.json", ],
|
|
||||||
require => Python::Setup::Install["/usr/local/src/vsroom"],
|
require => Python::Setup::Install["/usr/local/src/vsroom"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
vsroom/templates/config.json.erb
Normal file
4
vsroom/templates/config.json.erb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"authUrl": "<%= vsroom_authurl %>",
|
||||||
|
"boshUrl": "<%= vsroom_boshurl %>"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue