Merge "Remove password hash generation in each puppet modules"

This commit is contained in:
Zuul 2020-05-20 04:57:32 +00:00 committed by Gerrit Code Review
commit 9a1b5dac6c
5 changed files with 23 additions and 24 deletions

View File

@ -65,7 +65,7 @@ class trove::db::mysql(
::openstacklib::db::mysql { 'trove':
user => $user,
password_hash => mysql::password($password),
password => $password,
dbname => $dbname,
host => $host,
charset => $charset,

View File

@ -37,7 +37,7 @@ class trove::db::postgresql(
validate_legacy(String, 'validate_string', $password)
::openstacklib::db::postgresql { 'trove':
password_hash => postgresql_password($user, $password),
password => $password,
dbname => $dbname,
user => $user,
encoding => $encoding,

View File

@ -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": ">=17.0.0 <18.0.0"

View File

@ -28,7 +28,7 @@ describe 'trove::db::mysql' do
let :params do
{ :dbname => 'trove',
:password => 's3cr3t',
:password => 'trovepass',
:user => 'trove',
:charset => 'utf8',
:collate => 'utf8_general_ci',
@ -47,7 +47,7 @@ describe 'trove::db::mysql' do
is_expected.to contain_openstacklib__db__mysql('trove').with(
:user => params[:user],
:dbname => params[:dbname],
:password_hash => '*58C036CDA51D8E8BBBBF2F9EA5ABF111ADA444F0',
:password => params[:password],
:host => params[:host],
:charset => params[:charset]
)
@ -64,7 +64,7 @@ describe 'trove::db::mysql' do
is_expected.to contain_openstacklib__db__mysql('trove').with(
:user => params[:user],
:dbname => params[:dbname],
:password_hash => '*58C036CDA51D8E8BBBBF2F9EA5ABF111ADA444F0',
:password => params[:password],
:host => params[:host],
:charset => params[:charset],
:allowed_hosts => ['127.0.0.1','%']
@ -82,7 +82,7 @@ describe 'trove::db::mysql' do
is_expected.to contain_openstacklib__db__mysql('trove').with(
:user => params[:user],
:dbname => params[:dbname],
:password_hash => '*58C036CDA51D8E8BBBBF2F9EA5ABF111ADA444F0',
:password => params[:password],
:host => params[:host],
:charset => params[:charset],
:allowed_hosts => '192.168.1.1'

View File

@ -4,7 +4,7 @@ describe 'trove::db::postgresql' do
shared_examples_for 'trove::db::postgresql' do
let :req_params do
{ :password => 'pw' }
{ :password => 'trovepass' }
end
let :pre_condition do
@ -16,9 +16,12 @@ describe 'trove::db::postgresql' do
req_params
end
it { is_expected.to contain_postgresql__server__db('trove').with(
it { is_expected.to contain_openstacklib__db__postgresql('trove').with(
:user => 'trove',
:password => 'md5e12ef276d200761a0808f17a5b076451'
:password => 'trovepass',
:dbname => 'trove',
:encoding => nil,
:privileges => 'ALL',
)}
end