Merge "Remove password hash generation in each puppet modules"

This commit is contained in:
Zuul 2020-05-21 17:13:19 +00:00 committed by Gerrit Code Review
commit 14682fa0a2
5 changed files with 34 additions and 35 deletions

View File

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

View File

@ -35,11 +35,11 @@ class senlin::db::postgresql(
include senlin::deps
::openstacklib::db::postgresql { 'senlin':
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['senlin::db::begin']

View File

@ -9,10 +9,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": ">=17.0.0 <18.0.0"

View File

@ -7,7 +7,7 @@ describe 'senlin::db::mysql' do
end
let :required_params do
{ :password => 'fooboozoo_default_password', }
{ :password => 'senlinpass', }
end
shared_examples_for 'senlin-db-mysql' do
@ -17,12 +17,12 @@ describe 'senlin::db::mysql' do
end
it { is_expected.to contain_openstacklib__db__mysql('senlin').with(
:user => 'senlin',
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
:dbname => 'senlin',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:user => 'senlin',
:password => 'senlinpass',
:dbname => 'senlin',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
)}
end
@ -32,13 +32,13 @@ describe 'senlin::db::mysql' do
end
it { is_expected.to contain_openstacklib__db__mysql('senlin').with(
:user => 'senlin',
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
:dbname => 'senlin',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => ['127.0.0.1','%']
:user => 'senlin',
:password => 'senlinpass',
:dbname => 'senlin',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => ['127.0.0.1','%']
)}
end
@ -48,13 +48,13 @@ describe 'senlin::db::mysql' do
end
it { is_expected.to contain_openstacklib__db__mysql('senlin').with(
:user => 'senlin',
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
:dbname => 'senlin',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => '192.168.1.1'
:user => 'senlin',
:password => 'senlinpass',
:dbname => 'senlin',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => '192.168.1.1'
)}
end
end

View File

@ -7,7 +7,7 @@ describe 'senlin::db::postgresql' do
end
let :required_params do
{ :password => 'pw' }
{ :password => 'senlinpass' }
end
shared_examples_for 'senlin-db-postgresql' do
@ -16,9 +16,12 @@ describe 'senlin::db::postgresql' do
required_params
end
it { is_expected.to contain_postgresql__server__db('senlin').with(
:user => 'senlin',
:password => 'md5ff94da79a52941aa5482161f9dc751ae'
it { is_expected.to contain_openstacklib__db__postgresql('senlin').with(
:user => 'senlin',
:password => 'senlinpass',
:dbname => 'senlin',
:encoding => nil,
:privileges => 'ALL',
)}
end
end