diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index bf87f76edd..ced24e073e 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -3,22 +3,31 @@ class openstack_project::puppetmaster ( ) { class { 'openstack_project::server': iptables_public_tcp_ports => [8140], - sysadmins => $sysadmins + sysadmins => $sysadmins } - cron { "updatepuppetmaster": - user => root, - minute => "*/15", - command => 'sleep $((RANDOM\%600)) && cd /opt/openstack-ci-puppet/production && /usr/bin/git pull -q && /bin/bash install_modules.sh', - environment => "PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin", + + cron { 'updatepuppetmaster': + user => 'root', + minute => '*/15', + command => 'sleep $((RANDOM\%600)) && cd /opt/openstack-ci-puppet/production && /usr/bin/git pull -q && /bin/bash install_modules.sh', + environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin', + } + + cron { 'deleteoldreports': + user => 'root', + hour => '3', + minute => '0', + command => 'sleep $((RANDOM\%600)) && find /var/lib/puppet/reports -name \'*.yaml\' -mtime +7 -execdir rm {} \;', + environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin', } file { '/etc/puppet/hiera.yaml': - owner => 'root', - group => 'root', - mode => 555, - ensure => 'present', - source => 'puppet:///modules/openstack_project/puppetmaster/hiera.yaml', - replace => 'true', + ensure => present, + owner => 'root', + group => 'root', + mode => '0555', + source => 'puppet:///modules/openstack_project/puppetmaster/hiera.yaml', + replace => true, require => Class['openstack_project::server'] } }