diff --git a/modules/openstack_project/manifests/static.pp b/modules/openstack_project/manifests/static.pp index c71a0996f8..941682c84f 100644 --- a/modules/openstack_project/manifests/static.pp +++ b/modules/openstack_project/manifests/static.pp @@ -52,4 +52,11 @@ class openstack_project::static ( ensure => directory } + cron { "gziplogs": + user => root, + hour => "*/6", + command => 'sleep $((RANDOM\%600)) && flock -n /var/run/gziplogs.lock find /srv/static/logs/ \( -name \*.txt -or -name \*.html \) -exec gzip \{\} \;', + environment => "PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin", + } + }