Cleaned up vsroom module
This commit is contained in:
parent
2e1e072e67
commit
1b2d597281
3 changed files with 17 additions and 46 deletions
4
vsroom/files/config.json
Normal file
4
vsroom/files/config.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"authUrl": "../common/auth_credentials.php",
|
||||
"boshUrl": "/bosh/"
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
AuthType Basic
|
||||
AuthName "VSRoom"
|
||||
AuthUserFile /var/lib/vsroom/.htpasswd
|
||||
Require valid-user
|
|
@ -33,23 +33,6 @@ class vsroom {
|
|||
}
|
||||
python::setup::install { "/usr/local/src/vsroom": }
|
||||
|
||||
file { "/usr/local/bin/vsroomctl":
|
||||
ensure => present,
|
||||
mode => 0755,
|
||||
owner => root,
|
||||
group => root,
|
||||
source => "/usr/local/src/vsroom/contrib/vsroomctl/vsroomctl",
|
||||
require => Util::Extract::Tar["/usr/local/src/vsroom"],
|
||||
}
|
||||
file { "/usr/local/bin/vsroompasswd":
|
||||
ensure => present,
|
||||
mode => 0755,
|
||||
owner => root,
|
||||
group => root,
|
||||
source => "/usr/local/src/vsroom/contrib/vsroompasswd/vsroompasswd",
|
||||
require => Util::Extract::Tar["/usr/local/src/vsroom"],
|
||||
}
|
||||
|
||||
include user::system
|
||||
realize(User["vsroom"], Group["vsroom"])
|
||||
|
||||
|
@ -83,47 +66,35 @@ class vsroom {
|
|||
require => File["/var/lib/vsroom"],
|
||||
}
|
||||
|
||||
file { "/var/www/vsroom":
|
||||
ensure => directory,
|
||||
mode => 0755,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
$htdocs = $operatingsystem ? {
|
||||
"ubuntu" => "/usr/local/share/vsroom/htdocs",
|
||||
default => "/usr/share/vsroom/htdocs",
|
||||
}
|
||||
|
||||
file { "/var/www/vsroom/.htaccess":
|
||||
file { "${htdocs}/config.json":
|
||||
ensure => present,
|
||||
mode => 0644,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
source => "puppet:///modules/vsroom/htaccess",
|
||||
replace => false,
|
||||
require => File["/var/www/vsroom"],
|
||||
}
|
||||
|
||||
file { "/var/www/vsroom/config.json":
|
||||
ensure => present,
|
||||
mode => 0644,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
content => "{ \"boshUrl\": \"/jabber/http-bind/\" }\n",
|
||||
replace => false,
|
||||
require => File["/var/www/vsroom"],
|
||||
}
|
||||
|
||||
apache::configfile { "vsroom.conf":
|
||||
http => false,
|
||||
source => "puppet:///modules/vsroom/vsroom-httpd.conf",
|
||||
source => [ "puppet:///files/vsroom/config.json",
|
||||
"puppet:///modules/vsroom/config.json", ],
|
||||
require => Python::Setup::Install["/usr/local/src/vsroom"],
|
||||
}
|
||||
|
||||
define configwebhost() {
|
||||
file { "/srv/www/https/${name}/vsroom":
|
||||
ensure => link,
|
||||
target => "/var/www/vsroom",
|
||||
target => $htdocs,
|
||||
require => File["/srv/www/https/${name}"],
|
||||
}
|
||||
}
|
||||
|
||||
if $vsroom_webhosts {
|
||||
apache::configfile { "vsroom.conf":
|
||||
http => false,
|
||||
source => "puppet:///modules/vsroom/vsroom-httpd.conf",
|
||||
}
|
||||
|
||||
configwebhost { $vsroom_webhosts: }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue