$mailadm_password = $roles::pubsub::params::mailadm_password
$mailly_password = $roles::pubsub::params::mailly_password
$muffat_password = $roles::pubsub::params::muffat_password
+ $pet_password = $roles::pubsub::params::pet_password
rabbitmq_user { 'admin':
admin => true,
provider => 'rabbitmqctl',
}
+ rabbitmq_user { 'pet':
+ admin => false,
+ password => $pet_password,
+ provider => 'rabbitmqctl',
+ }
+
rabbitmq_vhost { 'packages':
ensure => present,
provider => 'rabbitmqctl',
provider => 'rabbitmqctl',
}
+ rabbitmq_vhost { 'pet':
+ ensure => present,
+ provider => 'rabbitmqctl',
+ }
+
rabbitmq_user_permissions { 'admin@/':
configure_permission => '.*',
read_permission => '.*',
]
}
+ rabbitmq_user_permissions { 'pet@pet':
+ configure_permission => '.*',
+ read_permission => '.*',
+ write_permission => '.*',
+ provider => 'rabbitmqctl',
+ require => [
+ Rabbitmq_user['pet'],
+ Rabbitmq_vhost['pet']
+ ]
+ }
+
rabbitmq_policy { 'mirror-dsa':
vhost => 'dsa',
match => '.*',
require => Rabbitmq_vhost['packages']
}
+ rabbitmq_policy { 'mirror_pet':
+ vhost => 'pet',
+ match => '.*',
+ policy => '{"ha-mode":"all"}',
+ require => Rabbitmq_vhost['pet']
+ }
+
rabbitmq_plugin { 'rabbitmq_management':
ensure => present,
provider => 'rabbitmqplugins',