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: I6a46e45b8af4c8c1cdf7913bc625b57e49a79687
This commit is contained in:
parent
8c956ab506
commit
f562e27069
@ -48,7 +48,7 @@ class ceilometer::db::mysql(
|
|||||||
|
|
||||||
openstacklib::db::mysql { 'ceilometer':
|
openstacklib::db::mysql { 'ceilometer':
|
||||||
user => $user,
|
user => $user,
|
||||||
password_hash => mysql::password($password),
|
password => $password,
|
||||||
dbname => $dbname,
|
dbname => $dbname,
|
||||||
host => $host,
|
host => $host,
|
||||||
charset => $charset,
|
charset => $charset,
|
||||||
|
@ -35,7 +35,7 @@ class ceilometer::db::postgresql(
|
|||||||
include ceilometer::deps
|
include ceilometer::deps
|
||||||
|
|
||||||
openstacklib::db::postgresql { 'ceilometer':
|
openstacklib::db::postgresql { 'ceilometer':
|
||||||
password_hash => postgresql_password($user, $password),
|
password => $password,
|
||||||
dbname => $dbname,
|
dbname => $dbname,
|
||||||
user => $user,
|
user => $user,
|
||||||
encoding => $encoding,
|
encoding => $encoding,
|
||||||
|
@ -13,10 +13,6 @@
|
|||||||
"name": "puppet/rabbitmq",
|
"name": "puppet/rabbitmq",
|
||||||
"version_requirement": ">=8.4.0 <11.0.0"
|
"version_requirement": ">=8.4.0 <11.0.0"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "puppetlabs/mysql",
|
|
||||||
"version_requirement": ">=6.0.0 <11.0.0"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "openstack/keystone",
|
"name": "openstack/keystone",
|
||||||
"version_requirement": ">=16.3.0 <17.0.0"
|
"version_requirement": ">=16.3.0 <17.0.0"
|
||||||
|
@ -7,7 +7,7 @@ describe 'ceilometer::db::mysql' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :password => 's3cr3t',
|
{ :password => 'ceilometerpass',
|
||||||
:dbname => 'ceilometer',
|
:dbname => 'ceilometer',
|
||||||
:user => 'ceilometer',
|
:user => 'ceilometer',
|
||||||
:host => 'localhost',
|
:host => 'localhost',
|
||||||
@ -26,7 +26,7 @@ describe 'ceilometer::db::mysql' do
|
|||||||
it 'creates a mysql database' do
|
it 'creates a mysql database' do
|
||||||
is_expected.to contain_openstacklib__db__mysql( params[:dbname] ).with(
|
is_expected.to contain_openstacklib__db__mysql( params[:dbname] ).with(
|
||||||
:user => params[:user],
|
:user => params[:user],
|
||||||
:password_hash => '*58C036CDA51D8E8BBBBF2F9EA5ABF111ADA444F0',
|
:password => params[:password],
|
||||||
:host => params[:host],
|
:host => params[:host],
|
||||||
:charset => params[:charset]
|
:charset => params[:charset]
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,7 @@ describe 'ceilometer::db::postgresql' do
|
|||||||
|
|
||||||
shared_examples_for 'ceilometer::db::postgresql' do
|
shared_examples_for 'ceilometer::db::postgresql' do
|
||||||
let :req_params do
|
let :req_params do
|
||||||
{ :password => 'pw' }
|
{ :password => 'ceilometerpass' }
|
||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
@ -16,9 +16,12 @@ describe 'ceilometer::db::postgresql' do
|
|||||||
req_params
|
req_params
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_postgresql__server__db('ceilometer').with(
|
it { is_expected.to contain_openstacklib__db__postgresql('ceilometer').with(
|
||||||
:user => 'ceilometer',
|
:user => 'ceilometer',
|
||||||
:password => 'md52899c518e96bce6633ab342b0ca38292'
|
:password => 'ceilometerpass',
|
||||||
|
:dbname => 'ceilometer',
|
||||||
|
:encoding => nil,
|
||||||
|
:privileges => 'ALL',
|
||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user