diff options
Diffstat (limited to 'modules/dashboard')
-rw-r--r-- | modules/dashboard/manifests/init.pp | 82 |
1 files changed, 39 insertions, 43 deletions
diff --git a/modules/dashboard/manifests/init.pp b/modules/dashboard/manifests/init.pp index e644109e..ff804010 100644 --- a/modules/dashboard/manifests/init.pp +++ b/modules/dashboard/manifests/init.pp @@ -1,48 +1,44 @@ class dashboard { - class variable { - $dashboard_login = "dashboard" - $dashboard_home_dir = "/var/lib/$dashboard_login" - $dashboard_dir = "$dashboard_home_dir/dashboard" - $dashboard_bindir = "$dashboard_home_dir/bin" - $dashboard_wwwdir = "/var/www/vhosts/dashboard.$domain" + $dashboard_login = 'dashboard' + $dashboard_home_dir = "/var/lib/$dashboard_login" + $dashboard_dir = "$dashboard_home_dir/dashboard" + $dashboard_bindir = "$dashboard_home_dir/bin" + $dashboard_wwwdir = "/var/www/vhosts/dashboard.$::domain" + + user { $dashboard_login: + comment => 'dashboard system user', + home => $dashboard_home_dir, } - class base inherits variable { - user {"$dashboard_login": - comment => "dashboard system user", - home => $dashboard_home_dir, - } - - subversion::snapshot { $dashboard_dir: - source => "svn://svn.$domain/soft/dashboard/", - } - - package { "php-cli": } - - file { $dashboard_wwwdir: - ensure => directory, - owner => $dashboard_login, - group => $dashboard_login, - } - - file { $dashboard_bindir: - ensure => directory, - } - - file { "$dashboard_bindir/make_report": - mode => 755, - content => template('dashboard/make_report'), - } - - apache::vhost::base { "dashboard.$domain": - location => $dashboard_wwwdir, - } - - cron { "update dashboard": - command => "$dashboard_bindir/make_report", - user => $dashboard_login, - hour => "*/2", - minute => '15', - } + subversion::snapshot { $dashboard_dir: + source => "svn://svn.$::domain/soft/dashboard/", + } + + package { 'php-cli': } + + file { $dashboard_wwwdir: + ensure => directory, + owner => $dashboard_login, + group => $dashboard_login, + } + + file { $dashboard_bindir: + ensure => directory, + } + + file { "$dashboard_bindir/make_report": + mode => '0755', + content => template('dashboard/make_report'), + } + + apache::vhost::base { "dashboard.$::domain": + location => $dashboard_wwwdir, + } + + cron { 'update dashboard': + command => "$dashboard_bindir/make_report", + user => $dashboard_login, + hour => '*/2', + minute => '15', } } |