Configure the Metadata Agent only when enable_metadata_agent is set

We should only configure the Nuage Metadata Agent only
when enable_metadata_agent is true. With this change
we seperate installation of nuage vrs with configuring
metadata agent.

Change-Id: Ie6a5f57b3f0d4b00192b0760942d07ee59b32fbb
This commit is contained in:
sunnyve 2018-10-04 13:58:58 -04:00
parent f078c31996
commit 0f86972455
1 changed files with 17 additions and 10 deletions

View File

@ -34,25 +34,32 @@
# (Optional) Nova tenant name
# Defaults to hiera('nova_os_tenant_name')
#
# [*enable_metadata_agent*]
# (Optional) Enable metadata agent
# Defaults to true
#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::agents::nuage (
$nova_auth_ip = hiera('keystone_public_api_virtual_ip', ''),
$nova_metadata_ip = hiera('nova_metadata_node_ips', ''),
$nova_os_password = hiera('nova_password', ''),
$nova_os_tenant_name = hiera('nova::api::admin_tenant_name', ''),
$step = Integer(hiera('step')),
$nova_auth_ip = hiera('keystone_public_api_virtual_ip', ''),
$nova_metadata_ip = hiera('nova_metadata_node_ips', ''),
$nova_os_password = hiera('nova_password', ''),
$nova_os_tenant_name = hiera('nova::api::admin_tenant_name', ''),
$enable_metadata_agent = true,
$step = Integer(hiera('step')),
) {
if $step >= 4 {
include ::nuage::vrs
class { '::nuage::metadataagent':
nova_os_tenant_name => $nova_os_tenant_name,
nova_os_password => $nova_os_password,
nova_metadata_ip => $nova_metadata_ip,
nova_auth_ip => $nova_auth_ip,
if $enable_metadata_agent {
class { '::nuage::metadataagent':
nova_os_tenant_name => $nova_os_tenant_name,
nova_os_password => $nova_os_password,
nova_metadata_ip => $nova_metadata_ip,
nova_auth_ip => $nova_auth_ip,
}
}
}
}