Ability to manage domain config seperately

This change allows a user of the heat::keystone::domain class to manage
the user creation seperately from the user configuration for the heat
services.

Previously one could disable the management of the users but could not
prevent the configuration file from being updated if all they wanted to
do was create the users.

Change-Id: Iab8204d3dfd727149d41ad86616a8f95a6f720dc
This commit is contained in:
Alex Schultz
2016-11-01 13:55:58 -06:00
parent eecda65a11
commit 08488e3686
3 changed files with 31 additions and 4 deletions

View File

@@ -30,6 +30,10 @@
# Whether manage or not the user role creation.
# Defaults to 'true'.
#
# [*manage_config*]
# Should the stack configuration be updated with the user information
# Defaults to 'true'
#
class heat::keystone::domain (
$domain_name = 'heat',
$domain_admin = 'heat_admin',
@@ -38,6 +42,7 @@ class heat::keystone::domain (
$manage_domain = true,
$manage_user = true,
$manage_role = true,
$manage_config = true,
) {
include ::heat::deps
@@ -63,9 +68,11 @@ class heat::keystone::domain (
})
}
heat_config {
'DEFAULT/stack_domain_admin': value => $domain_admin;
'DEFAULT/stack_domain_admin_password': value => $domain_password, secret => true;
'DEFAULT/stack_user_domain_name': value => $domain_name;
if $manage_config {
heat_config {
'DEFAULT/stack_domain_admin': value => $domain_admin;
'DEFAULT/stack_domain_admin_password': value => $domain_password, secret => true;
'DEFAULT/stack_user_domain_name': value => $domain_name;
}
}
}