diff --git a/modules/openstack_project/files/mailman/mk-archives-index b/modules/openstack_project/files/mailman/mk-archives-index new file mode 100755 index 0000000000..a814ad8a0c --- /dev/null +++ b/modules/openstack_project/files/mailman/mk-archives-index @@ -0,0 +1,9 @@ +#!/bin/sh + +for site in `cut -d: -f1 /etc/mailman/sites | sort`; do + echo "$site:" + dir=`grep ^${site}: /etc/mailman/sites | cut -d' ' -f2` + for ml in `ls ${dir}/archives/public/ | sort`; do + echo " - $ml" + done +done diff --git a/modules/openstack_project/manifests/lists.pp b/modules/openstack_project/manifests/lists.pp index 2418f3447c..9234f67301 100644 --- a/modules/openstack_project/manifests/lists.pp +++ b/modules/openstack_project/manifests/lists.pp @@ -17,6 +17,26 @@ class openstack_project::lists( mode => '0444', } + file { '/usr/local/sbin/mk-archives-index': + ensure => present, + source => 'puppet:///modules/openstack_project/mailman/mk-archives-index', + owner => 'root', + group => 'root', + replace => true, + mode => '0744', + } + + cron { 'mk-archives-index': + user => root, + hour => '0', + minute => '0', + command => 'mk-archives-index > /var/www/archives.yaml', + environment => 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', + require => File['/usr/local/sbin/mk-archives-index', + ], + } + + # Disable inactive admins user::virtual::disable { 'oubiwann': } user::virtual::disable { 'rockstar': }