diff --git a/manifests/profile/rabbitmq.pp b/manifests/profile/rabbitmq.pp index c4a0fe7e4fb31ccf4a9cefc63efd9acab730775f..93efe3f2af96b56405fdf709e5a03cef55925a53 100644 --- a/manifests/profile/rabbitmq.pp +++ b/manifests/profile/rabbitmq.pp @@ -5,6 +5,7 @@ class iaas::profile::rabbitmq ( $user = undef, $password = undef, $erlang = undef, + $node_hostname = $::hostname, ) { class {'erlang': } -> package { 'erlang-base': @@ -21,6 +22,9 @@ class iaas::profile::rabbitmq ( wipe_db_on_cookie_change => true, cluster_partition_handling => 'pause_minority', config_variables => { 'tcp_listen_options' => "[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]" }, + environment_variables => { + 'NODENAME' => "rabbit@$node_hostname", + }, } -> rabbitmq_user { $user: admin => true, diff --git a/manifests/role/rhmk.pp b/manifests/role/rhmk.pp index 8bd05b1ce9623c191a088052a380b5df9978bcfd..3ecdb649dcc789d41207c7969c8252f749ac1501 100644 --- a/manifests/role/rhmk.pp +++ b/manifests/role/rhmk.pp @@ -9,6 +9,7 @@ class iaas::role::rhmk( $haproxy_controller_hosts = undef, $haproxy_controller_ips = undef, $vip = undef, + $rabbit_hostname = undef, ) { # Base class { 'iaas::profile::base': } -> @@ -28,5 +29,7 @@ class iaas::role::rhmk( state => $keepalived_state, priority => $keepalived_priority, } - class { 'iaas::profile::rabbitmq': } + class { 'iaas::profile::rabbitmq': + node_hostname => $rabbit_hostname, + } }