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,
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',
provider => 'rabbitmqctl',
}
+ rabbitmq_vhost { 'dsa':
+ ensure => present,
+ provider => 'rabbitmqctl',
+ }
+
rabbitmq_user_permissions { 'admin@/':
configure_permission => '.*',
read_permission => '.*',
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 => '.*',
]
}
+ 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 => '.*',