Remove password hash generation in each puppet modules
... and migrate it to openstacklib so that all logics about database configuration are implemented in one common place. Depends-on: https://review.opendev.org/#/c/728595/ Change-Id: I6b4f8479030b28957c540c5f0775d5f799dff5dd
This commit is contained in:
parent
a5a8b53078
commit
4e7d912fde
@ -49,7 +49,7 @@ class mistral::db::mysql(
|
||||
|
||||
::openstacklib::db::mysql { 'mistral':
|
||||
user => $user,
|
||||
password_hash => mysql::password($password),
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
host => $host,
|
||||
charset => $charset,
|
||||
|
@ -35,11 +35,11 @@ class mistral::db::postgresql(
|
||||
include mistral::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'mistral':
|
||||
password_hash => postgresql_password($user, $password),
|
||||
dbname => $dbname,
|
||||
user => $user,
|
||||
encoding => $encoding,
|
||||
privileges => $privileges,
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
user => $user,
|
||||
encoding => $encoding,
|
||||
privileges => $privileges,
|
||||
}
|
||||
|
||||
Anchor['mistral::db::begin']
|
||||
|
@ -13,10 +13,6 @@
|
||||
"name": "puppetlabs/stdlib",
|
||||
"version_requirement": ">=5.0.0 <7.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/mysql",
|
||||
"version_requirement": ">=6.0.0 <11.0.0"
|
||||
},
|
||||
{
|
||||
"name": "openstack/keystone",
|
||||
"version_requirement": ">=16.3.0 <17.0.0"
|
||||
|
@ -7,19 +7,19 @@ describe 'mistral::db::mysql' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:password => 'fooboozoo_default_password',
|
||||
:password => 'mistralpass',
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples 'mistral::db::mysql' do
|
||||
context 'with only required params' do
|
||||
it { should contain_openstacklib__db__mysql('mistral').with(
|
||||
:user => 'mistral',
|
||||
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
|
||||
:dbname => 'mistral',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
:user => 'mistral',
|
||||
:password => 'mistralpass',
|
||||
:dbname => 'mistral',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
)}
|
||||
end
|
||||
|
||||
|
@ -4,7 +4,7 @@ describe 'mistral::db::postgresql' do
|
||||
|
||||
shared_examples_for 'mistral::db::postgresql' do
|
||||
let :req_params do
|
||||
{ :password => 'pw' }
|
||||
{ :password => 'mistralpass' }
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
@ -16,9 +16,12 @@ describe 'mistral::db::postgresql' do
|
||||
req_params
|
||||
end
|
||||
|
||||
it { is_expected.to contain_postgresql__server__db('mistral').with(
|
||||
:user => 'mistral',
|
||||
:password => 'md56cc4a9db977897a441d3a498a5d94fce'
|
||||
it { is_expected.to contain_openstacklib__db__postgresql('mistral').with(
|
||||
:user => 'mistral',
|
||||
:password => 'mistralpass',
|
||||
:dbname => 'mistral',
|
||||
:encoding => nil,
|
||||
:privileges => 'ALL',
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user