$cluster_cookie = $roles::pubsub::params::cluster_cookie
- $cc_master = rainier
- $cc_secondary = rapoport
+ # Get the fact named hostname from all nodes in puppetdb with class Roles::Pubsub
+ $query = 'facts { name = "hostname" and resources { type = "Class" and title = "Roles::Pubsub" } }'
+ $cluster_nodes = sort(puppetdb_query($query).map |$value| { $value["value"] })
class { 'rabbitmq':
config_cluster => true,
- cluster_nodes => [
- $cc_master,
- $cc_secondary,
- ],
+ cluster_nodes => $cluster_nodes,
cluster_node_type => 'disc',
erlang_cookie => '8r17so6o1s124ns49sr08n0o24342160',
delete_guest_user => true,