diff --git a/deployment_scripts/manifests/murano.pp b/deployment_scripts/manifests/murano.pp index 5e2fc91..6ff275b 100644 --- a/deployment_scripts/manifests/murano.pp +++ b/deployment_scripts/manifests/murano.pp @@ -115,8 +115,8 @@ class { '::murano' : rabbit_own_host => $public_ip, rabbit_own_port => $murano_hash['rabbit']['port'], rabbit_own_vhost => $murano_hash['rabbit']['vhost'], - rabbit_own_user => $rabbit_hash['user'], - rabbit_own_password => $rabbit_hash['password'], + rabbit_own_user => $murano_hash['rabbit']['user'], + rabbit_own_password => $murano_hash['rabbit']['password'], default_router => $default_router, default_nameservers => join($external_dns['dns_list'], ','), service_host => $api_bind_host, diff --git a/deployment_scripts/manifests/murano_hiera_override.pp b/deployment_scripts/manifests/murano_hiera_override.pp index 77af6ca..3c3b117 100644 --- a/deployment_scripts/manifests/murano_hiera_override.pp +++ b/deployment_scripts/manifests/murano_hiera_override.pp @@ -29,10 +29,12 @@ if $murano_plugin { $murano_nodes_ips = values($murano_address_map) $murano_nodes_names = keys($murano_address_map) } - $murano_db_password = pick($settings_hash['murano_db_password'], $murano_base_hash['db_password']) - $murano_user_password = pick($settings_hash['murano_user_password'], $murano_base_hash['user_password']) - $murano_rabbit_host = pick($settings_hash['murano_rabbit_vhost'], $murano_base_hash['rabbit']['vhost']) - $murano_rabbit_port = pick($settings_hash['murano_rabbit_port'], $murano_base_hash['rabbit']['port']) + $murano_db_password = pick($settings_hash['murano_db_password'], $murano_base_hash['db_password']) + $murano_user_password = pick($settings_hash['murano_user_password'], $murano_base_hash['user_password']) + $murano_rabbit_user = pick($settings_hash['murano_rabbit_user'], 'murano') + $murano_rabbit_password = pick($settings_hash['murano_rabbit_password'], $murano_base_hash['rabbit_password']) + $murano_rabbit_host = pick($settings_hash['murano_rabbit_vhost'], $murano_base_hash['rabbit']['vhost']) + $murano_rabbit_port = pick($settings_hash['murano_rabbit_port'], $murano_base_hash['rabbit']['port']) $murano_cfapi_enabled = $murano_plugin['murano_cfapi'] $murano_repo_url = $murano_plugin['murano_repo_url'] @@ -55,6 +57,8 @@ murano_plugin: %> - <%= muranoname %> <% end -%> rabbit: + user: <%= @murano_rabbit_user %> + password: <%= @murano_rabbit_password %> vhost: <%= @murano_rabbit_host %> port: <%= @murano_rabbit_port %> db_password: <%= @murano_db_password %> diff --git a/deployment_scripts/manifests/murano_rabbitmq.pp b/deployment_scripts/manifests/murano_rabbitmq.pp index ed2272f..aee513e 100644 --- a/deployment_scripts/manifests/murano_rabbitmq.pp +++ b/deployment_scripts/manifests/murano_rabbitmq.pp @@ -1,17 +1,8 @@ notice('MODULAR: murano_rabbitmq.pp') -$rabbit_hash = hiera_hash('rabbit', {}) -$murano_hash = hiera_hash('murano_plugin', {}) - -if $rabbit_hash == {} { - fail('No rabbit_hash defined') -} -if !$rabbit_hash['password'] { - fail('Rabbit password is not set') -} - -$rabbit_user = pick($rabbit_hash['user'], 'nova') -$rabbit_password = $rabbit_hash['password'] +$murano_hash = hiera_hash('murano_plugin', {}) +$rabbit_user = $murano_hash['rabbit']['user'] +$rabbit_password = $murano_hash['rabbit']['password'] $rabbit_vhost = $murano_hash['rabbit']['vhost'] $rabbit_node_name = 'murano@localhost' $rabbit_service_name = 'murano-rabbitmq'