From cd911b7ad416913f45c4d6ac6f66c0f75d87f549 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Wed, 11 Sep 2013 08:41:10 +0100 Subject: [PATCH] add stuff for mail Signed-off-by: Stephen Gran --- modules/roles/manifests/pubsub/entities.pp | 84 ++++++++++++++++++++-- 1 file changed, 80 insertions(+), 4 deletions(-) diff --git a/modules/roles/manifests/pubsub/entities.pp b/modules/roles/manifests/pubsub/entities.pp index d06832fa3..48818f679 100644 --- a/modules/roles/manifests/pubsub/entities.pp +++ b/modules/roles/manifests/pubsub/entities.pp @@ -1,10 +1,13 @@ class roles::pubsub::entities { include roles::pubsub::params - $admin_password = $roles::pubsub::params::admin_password - $ftp_password = $roles::pubsub::params::ftp_password - $buildd_password = $roles::pubsub::params::buildd_password - $wbadm_password = $roles::pubsub::params::wbadm_password + $admin_password = $roles::pubsub::params::admin_password + $ftp_password = $roles::pubsub::params::ftp_password + $buildd_password = $roles::pubsub::params::buildd_password + $wbadm_password = $roles::pubsub::params::wbadm_password + $mailadm_password = $roles::pubsub::params::mailadm_password + $mailly_password = $roles::pubsub::params::mailly_password + $muffat_password = $roles::pubsub::params::muffat_password rabbitmq_user { 'admin': admin => true, @@ -30,6 +33,24 @@ class roles::pubsub::entities { provider => 'rabbitmqctl', } + rabbitmq_user { 'mailadm': + admin => true, + password => $mailadm_password, + provider => 'rabbitmqctl', + } + + rabbitmq_user { 'mailly': + admin => true, + password => $mailly_password, + provider => 'rabbitmqctl', + } + + rabbitmq_user { 'muffat': + admin => true, + password => $muffat_password, + provider => 'rabbitmqctl', + } + rabbitmq_vhost { 'packages': ensure => present, provider => 'rabbitmqctl', @@ -40,6 +61,11 @@ class roles::pubsub::entities { provider => 'rabbitmqctl', } + rabbitmq_vhost { 'dsa': + ensure => present, + provider => 'rabbitmqctl', + } + rabbitmq_user_permissions { 'admin@/': configure_permission => '.*', read_permission => '.*', @@ -58,6 +84,18 @@ class roles::pubsub::entities { Rabbitmq_vhost['buildd'] ] } + + rabbitmq_user_permissions { 'admin@dsa': + configure_permission => '.*', + read_permission => '.*', + write_permission => '.*', + provider => 'rabbitmqctl', + require => [ + Rabbitmq_user['admin'], + Rabbitmq_vhost['dsa'] + ] + } + rabbitmq_user_permissions { 'admin@packages': configure_permission => '.*', read_permission => '.*', @@ -112,6 +150,44 @@ class roles::pubsub::entities { ] } + rabbitmq_user_permissions { 'mailadm@dsa': + configure_permission => '.*', + read_permission => '.*', + write_permission => '.*', + provider => 'rabbitmqctl', + require => [ + Rabbitmq_user['mailadm'], + Rabbitmq_vhost['dsa'] + ] + } + + rabbitmq_user_permissions { 'mailly@dsa': + read_permission => 'mailadm', + write_permission => 'mailly', + provider => 'rabbitmqctl', + require => [ + Rabbitmq_user['mailly'], + Rabbitmq_vhost['dsa'] + ] + } + + rabbitmq_user_permissions { 'muffat@dsa': + read_permission => 'mailadm', + write_permission => 'muffat', + provider => 'rabbitmqctl', + require => [ + Rabbitmq_user['muffat'], + Rabbitmq_vhost['dsa'] + ] + } + + rabbitmq_policy { 'mirror-dsa': + vhost => 'dsa', + match => '.*', + policy => '{"ha-mode":"all"}', + require => Rabbitmq_vhost['dsa'] + } + rabbitmq_policy { 'mirror-buildd': vhost => 'buildd', match => '.*', -- 2.20.1