
This patch adds support for hostname values in all host related parameters in answer file. Resolves-bug: rhbz#1129773 Change-Id: I4e912ac0b5a6feab30866da3dd5525fbc6824460
44 lines
1.7 KiB
Puppet
44 lines
1.7 KiB
Puppet
$glance_ks_pw = hiera('CONFIG_GLANCE_DB_PW')
|
|
$glance_mariadb_host = hiera('CONFIG_MARIADB_HOST_URL')
|
|
$glance_cfg_ctrl_host = hiera('CONFIG_KEYSTONE_HOST_URL')
|
|
|
|
# glance option bind_host requires address without brackets
|
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
|
'ipv6' => '::0',
|
|
default => '0.0.0.0',
|
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
|
}
|
|
# magical hack for magical config - glance option registry_host requires brackets
|
|
$registry_host = hiera('CONFIG_IP_VERSION') ? {
|
|
'ipv6' => '[::0]',
|
|
default => '0.0.0.0',
|
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
|
}
|
|
|
|
class { '::glance::api':
|
|
bind_host => $bind_host,
|
|
registry_host => $registry_host,
|
|
auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
|
|
identity_uri => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
|
|
keystone_tenant => 'services',
|
|
keystone_user => 'glance',
|
|
keystone_password => hiera('CONFIG_GLANCE_KS_PW'),
|
|
pipeline => 'keystone',
|
|
database_connection => "mysql://glance:${glance_ks_pw}@${glance_mariadb_host}/glance",
|
|
verbose => true,
|
|
debug => hiera('CONFIG_DEBUG_MODE'),
|
|
os_region_name => hiera('CONFIG_KEYSTONE_REGION'),
|
|
}
|
|
|
|
class { '::glance::registry':
|
|
auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
|
|
identity_uri => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
|
|
bind_host => $bind_host,
|
|
keystone_tenant => 'services',
|
|
keystone_user => 'glance',
|
|
keystone_password => hiera('CONFIG_GLANCE_KS_PW'),
|
|
database_connection => "mysql://glance:${glance_ks_pw}@${glance_mariadb_host}/glance",
|
|
verbose => true,
|
|
debug => hiera('CONFIG_DEBUG_MODE'),
|
|
}
|