From b8e8e502cfcaebefeb100644f8df1bc05b1995fb Mon Sep 17 00:00:00 2001 From: Stefano Maffulli Date: Mon, 20 May 2013 13:47:24 -0700 Subject: [PATCH] Puppetizing mailing lists Allow for mailing lists to be created with a request for review. Change-Id: I8b3b0965119418cfc9286cd20221fe38ffd06b24 Reviewed-on: https://review.openstack.org/29833 Reviewed-by: Clark Boylan Reviewed-by: Jeremy Stanley Reviewed-by: Elizabeth Krumbach Joseph Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- manifests/site.pp | 3 ++- modules/openstack_project/manifests/lists.pp | 21 +++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 4e4bdb1e18..682703a522 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -123,7 +123,8 @@ node 'groups.openstack.org' { node 'lists.openstack.org' { class { 'openstack_project::lists': - listadmins => hiera('listadmins'), + listadmins => hiera('listadmins'), + listpassword => hiera('listpassword'), } } diff --git a/modules/openstack_project/manifests/lists.pp b/modules/openstack_project/manifests/lists.pp index 939694ae9e..30d3ea0063 100644 --- a/modules/openstack_project/manifests/lists.pp +++ b/modules/openstack_project/manifests/lists.pp @@ -1,6 +1,9 @@ # == Class: openstack_project::lists # -class openstack_project::lists($listadmins = '') { +class openstack_project::lists( + $listadmins, + $listpassword = '' +) { # Using openstack_project::template instead of openstack_project::server # because the exim config on this machine is almost certainly # going to be more complicated than normal. @@ -8,17 +11,29 @@ class openstack_project::lists($listadmins = '') { iptables_public_tcp_ports => [25, 80, 465], } + $listdomain = 'lists.openstack.org' + class { 'exim': sysadmin => $listadmins, - mailman_domains => ['lists.openstack.org'], + mailman_domains => [$listdomain], } class { 'mailman': - vhost_name => 'lists.openstack.org', + vhost_name => $listdomain, } realize ( User::Virtual::Localuser['oubiwann'], User::Virtual::Localuser['smaffulli'], ) + + maillist { 'openstack-it': + ensure => present, + admin => 'stefano@openstack.org', + password => $listpassword, + description => 'Discussioni su OpenStack in italiano', + webserver => $listdomain, + mailserver => $listdomain, + } + }