diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-06-20 19:50:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-06-20 19:50:12 +0000 |
commit | b5201df147d3aba0801a9ab43657ec418e888104 (patch) | |
tree | 9d7db9bd71f4657fca028af4563a0092d2bf289a /modules | |
parent | b2ed0651b97c46b5a6654efc5bb6080a4f8231d9 (diff) | |
download | puppet-b5201df147d3aba0801a9ab43657ec418e888104.tar puppet-b5201df147d3aba0801a9ab43657ec418e888104.tar.gz puppet-b5201df147d3aba0801a9ab43657ec418e888104.tar.bz2 puppet-b5201df147d3aba0801a9ab43657ec418e888104.tar.xz puppet-b5201df147d3aba0801a9ab43657ec418e888104.zip |
add script to generate dashboard reports
Diffstat (limited to 'modules')
-rw-r--r-- | modules/dashboard/manifests/init.pp | 24 | ||||
-rw-r--r-- | modules/dashboard/templates/make_report | 8 |
2 files changed, 32 insertions, 0 deletions
diff --git a/modules/dashboard/manifests/init.pp b/modules/dashboard/manifests/init.pp index 5ff01a7d..5901f5ab 100644 --- a/modules/dashboard/manifests/init.pp +++ b/modules/dashboard/manifests/init.pp @@ -3,6 +3,8 @@ class dashboard { $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" } class base inherits variable { @@ -21,5 +23,27 @@ class dashboard { package { "php-cli": ensure => 'installed', } + + file { $dashboard_www: + ensure => directory, + owner => $dashboard_login, + group => $dashboard_login, + mode => 755, + } + + file { $dashboard_bindir: + ensure => directory, + owner => root, + group => root, + mode => 755, + } + + file { "$dashboard_bindir/make_report": + ensure => present, + owner => root, + group => root, + mode => 755, + content => template('dashboard/make_report'), + } } } diff --git a/modules/dashboard/templates/make_report b/modules/dashboard/templates/make_report new file mode 100644 index 00000000..25c2f316 --- /dev/null +++ b/modules/dashboard/templates/make_report @@ -0,0 +1,8 @@ +#!/bin/sh + +dashboard_dir='<%= dashboard_dir %>' +dashboard_wwwdir='<%= dashboard_wwwdir %>' + +cd "$dashboard_dir" +/usr/bin/php ./make_report.php > "$dashboard_wwwdir/index.html" + |