Simplify sysinv password runtime for rehoming

This runtime is supposed to be only used for changing password in
/etc/sysinv/api-paste.ini, /etc/sysinv/sysinv.conf,
/etc/sysinv/cert-mon.conf and /etc/sysinv/cert-alarm.conf.

Test plan:
Passed - rehoming test for DX subcloud without host swact

Story: 2010230
Task: 46945

Signed-off-by: Li Zhu <li.zhu@windriver.com>
Change-Id: I7686c8e8e10f236b581b07cc0f33089ef3b2c7d8
This commit is contained in:
Li Zhu 2022-11-24 13:18:14 -05:00
parent 35fc7f4bd6
commit 44d6185c48
4 changed files with 46 additions and 4 deletions

View File

@ -369,3 +369,18 @@ class sysinv::api (
}
}
class sysinv::api::keystone::password (
$keystone_enabled = true
) {
if $keystone_enabled {
sysinv_config {
'keystone_authtoken/password': value => lookup('sysinv::api::keystone_password'), secret => true;
}
sysinv_api_paste_ini {
'filter:authtoken/password': value => lookup('sysinv::api::keystone_password'), secret => true;
}
}
}

View File

@ -98,3 +98,14 @@ class sysinv::certalarm (
}
}
}
class sysinv::certalarm::keystone::password (
$keystone_enabled = true
) {
if $keystone_enabled {
certalarm_config {
'keystone_authtoken/password': value => lookup('sysinv::certalarm::local_keystone_password'), secret => true;
}
}
}

View File

@ -131,3 +131,20 @@ class sysinv::certmon (
}
}
}
class sysinv::certmon::keystone::password (
$keystone_enabled = true
) {
if $keystone_enabled {
certmon_config {
'keystone_authtoken/password': value => lookup('sysinv::certmon::local_keystone_password'), secret => true;
}
if $::platform::params::distributed_cloud_role == 'systemcontroller' {
certmon_config {
'endpoint_cache/password': value => lookup('sysinv::certmon::dc_keystone_password'), secret => true;
}
}
}
}

View File

@ -676,8 +676,7 @@ class openstack::keystone::nfv::password::runtime {
}
class openstack::keystone::sysinv::password::runtime {
include ::sysinv::api
include ::platform::sysinv
include ::sysinv::certmon
include ::sysinv::certalarm
include ::sysinv::api::keystone::password
include ::sysinv::certmon::keystone::password
include ::sysinv::certalarm::keystone::password
}