diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-31 12:56:52 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-31 12:56:52 +0000 |
commit | 9bda1ab55c13c4ee1b4e1031246ed61f861fcf9b (patch) | |
tree | 93084e1d7feb728c631a96a2f09c1410afa75bb6 /manifests/profile/base | |
parent | 62899a4795add26a0c599383ccbbf52f6ff255d1 (diff) | |
parent | d910331e816a16f9fa32eaa25ada5edb9c644f44 (diff) |
Merge "Calculate zaqar mongo from mongodb_node_ips"
Diffstat (limited to 'manifests/profile/base')
-rw-r--r-- | manifests/profile/base/zaqar.pp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/manifests/profile/base/zaqar.pp b/manifests/profile/base/zaqar.pp index 6794742..89a03ad 100644 --- a/manifests/profile/base/zaqar.pp +++ b/manifests/profile/base/zaqar.pp @@ -32,8 +32,23 @@ class tripleo::profile::base::zaqar ( ) { if $step >= 4 { include ::zaqar - include ::zaqar::management::mongodb - include ::zaqar::messaging::mongodb + + if str2bool(hiera('mongodb::server::ipv6', false)) { + $mongo_node_ips_with_port_prefixed = prefix(hiera('mongodb_node_ips'), '[') + $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017') + } else { + $mongo_node_ips_with_port = suffix(hiera('mongodb_node_ips'), ':27017') + } + $mongodb_replset = hiera('mongodb::server::replset') + $mongo_node_string = join($mongo_node_ips_with_port, ',') + $database_connection = "mongodb://${mongo_node_string}/zaqar?replicaSet=${mongodb_replset}" + + class { '::zaqar::management::mongodb': + uri => $database_connection, + } + class {'::zaqar::messaging::mongodb': + uri => $database_connection, + } include ::zaqar::transport::websocket include ::zaqar::transport::wsgi |