Merge "Remove password hash generation in each puppet modules"

This commit is contained in:
Zuul 2020-05-21 17:16:20 +00:00 committed by Gerrit Code Review
commit 443b04831b
5 changed files with 34 additions and 35 deletions

View File

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

View File

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

View File

@ -13,10 +13,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/keystone",
"version_requirement": ">=17.0.0 <18.0.0"

View File

@ -7,7 +7,7 @@ describe 'tacker::db::mysql' do
end
let :required_params do
{ :password => 'fooboozoo_default_password', }
{ :password => 'tackerpass', }
end
shared_examples_for 'tacker-db-mysql' do
@ -17,12 +17,12 @@ describe 'tacker::db::mysql' do
end
it { is_expected.to contain_openstacklib__db__mysql('tacker').with(
:user => 'tacker',
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
:dbname => 'tacker',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:user => 'tacker',
:password => 'tackerpass',
:dbname => 'tacker',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
)}
end
@ -32,13 +32,13 @@ describe 'tacker::db::mysql' do
end
it { is_expected.to contain_openstacklib__db__mysql('tacker').with(
:user => 'tacker',
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
:dbname => 'tacker',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => ['127.0.0.1','%']
:user => 'tacker',
:password => 'tackerpass',
:dbname => 'tacker',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => ['127.0.0.1','%']
)}
end
@ -48,13 +48,13 @@ describe 'tacker::db::mysql' do
end
it { is_expected.to contain_openstacklib__db__mysql('tacker').with(
:user => 'tacker',
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
:dbname => 'tacker',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => '192.168.1.1'
:user => 'tacker',
:password => 'tackerpass',
:dbname => 'tacker',
: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 'tacker::db::postgresql' do
end
let :required_params do
{ :password => 'pw' }
{ :password => 'tackerpass' }
end
shared_examples_for 'tacker-db-postgresql' do
@ -16,9 +16,12 @@ describe 'tacker::db::postgresql' do
required_params
end
it { is_expected.to contain_postgresql__server__db('tacker').with(
:user => 'tacker',
:password => 'md54fb52f4ce3618bd50cf38d2b7399db7a'
it { is_expected.to contain_openstacklib__db__postgresql('tacker').with(
:user => 'tacker',
:password => 'tackerpass',
:dbname => 'tacker',
:encoding => nil,
:privileges => 'ALL',
)}
end
end