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: Ie564c3ae6023a36f317b963872059509754970e5
This commit is contained in:
parent
368683a8d0
commit
8ab7ef4044
@ -49,7 +49,7 @@ class keystone::db::mysql(
|
||||
|
||||
::openstacklib::db::mysql { 'keystone':
|
||||
user => $user,
|
||||
password_hash => mysql::password($password),
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
host => $host,
|
||||
charset => $charset,
|
||||
|
@ -45,11 +45,11 @@ class keystone::db::postgresql(
|
||||
include keystone::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'keystone':
|
||||
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['keystone::db::begin']
|
||||
|
@ -17,10 +17,6 @@
|
||||
"name": "puppet/rabbitmq",
|
||||
"version_requirement": ">=8.4.0 <11.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/mysql",
|
||||
"version_requirement": ">=6.0.0 <11.0.0"
|
||||
},
|
||||
{
|
||||
"name": "openstack/openstacklib",
|
||||
"version_requirement": ">=16.3.0 <17.0.0"
|
||||
|
@ -8,18 +8,18 @@ describe 'keystone::db::mysql' do
|
||||
shared_examples 'keystone::db::mysql' do
|
||||
context 'with required params' do
|
||||
before do
|
||||
params.merge!( :password => 'keystone_default_password' )
|
||||
params.merge!( :password => 'keystonepass' )
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('keystone::deps') }
|
||||
|
||||
it { is_expected.to contain_openstacklib__db__mysql('keystone').with(
|
||||
:user => 'keystone',
|
||||
:password_hash => '*B552157B14BCEDDCEAA06767A012F31BDAA9CE3D',
|
||||
:dbname => 'keystone',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
:user => 'keystone',
|
||||
:password => 'keystonepass',
|
||||
:dbname => 'keystone',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
)}
|
||||
end
|
||||
|
||||
@ -38,7 +38,7 @@ describe 'keystone::db::mysql' do
|
||||
|
||||
it { is_expected.to contain_openstacklib__db__mysql('keystone').with(
|
||||
:user => 'keystoneuser',
|
||||
:password_hash => '*706BFA85E15D0C1D8467D0D81D784F6A04CE4ABB',
|
||||
:password => 'keystonepass',
|
||||
:dbname => 'keystonedb',
|
||||
:host => '1.2.3.4',
|
||||
:charset => 'latin2',
|
||||
|
@ -4,7 +4,7 @@ describe 'keystone::db::postgresql' do
|
||||
shared_examples 'keystone::db::postgresql' do
|
||||
let :req_params do
|
||||
{
|
||||
:password => 'pw',
|
||||
:password => 'keystonepass',
|
||||
}
|
||||
end
|
||||
|
||||
@ -17,9 +17,12 @@ describe 'keystone::db::postgresql' do
|
||||
req_params
|
||||
end
|
||||
|
||||
it { is_expected.to contain_postgresql__server__db('keystone').with(
|
||||
:user => 'keystone',
|
||||
:password => 'md5c530c33636c58ae83ca933f39319273e'
|
||||
it { is_expected.to contain_openstacklib__db__postgresql('keystone').with(
|
||||
:user => 'keystone',
|
||||
:password => 'keystonepass',
|
||||
:dbname => 'keystone',
|
||||
:encoding => nil,
|
||||
:privileges => 'ALL',
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user