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: I1457fdeba6cdbba29c4104b638c1ebf125556a2f
This commit is contained in:
@@ -49,7 +49,7 @@ class cloudkitty::db::mysql(
|
|||||||
|
|
||||||
::openstacklib::db::mysql { 'cloudkitty':
|
::openstacklib::db::mysql { 'cloudkitty':
|
||||||
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 cloudkitty::db::postgresql(
|
|||||||
include cloudkitty::deps
|
include cloudkitty::deps
|
||||||
|
|
||||||
::openstacklib::db::postgresql { 'cloudkitty':
|
::openstacklib::db::postgresql { 'cloudkitty':
|
||||||
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": "puppetlabs/stdlib",
|
"name": "puppetlabs/stdlib",
|
||||||
"version_requirement": ">=5.0.0 <7.0.0"
|
"version_requirement": ">=5.0.0 <7.0.0"
|
||||||
|
@@ -7,7 +7,7 @@ describe 'cloudkitty::db::mysql' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :required_params do
|
let :required_params do
|
||||||
{ :password => 'fooboozoo_default_password', }
|
{ :password => 'cloudkittypass', }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'cloudkitty-db-mysql' do
|
shared_examples_for 'cloudkitty-db-mysql' do
|
||||||
@@ -18,7 +18,7 @@ describe 'cloudkitty::db::mysql' do
|
|||||||
|
|
||||||
it { is_expected.to contain_openstacklib__db__mysql('cloudkitty').with(
|
it { is_expected.to contain_openstacklib__db__mysql('cloudkitty').with(
|
||||||
:user => 'cloudkitty',
|
:user => 'cloudkitty',
|
||||||
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
|
:password => 'cloudkittypass',
|
||||||
:dbname => 'cloudkitty',
|
:dbname => 'cloudkitty',
|
||||||
:host => '127.0.0.1',
|
:host => '127.0.0.1',
|
||||||
:charset => 'utf8',
|
:charset => 'utf8',
|
||||||
@@ -33,7 +33,7 @@ describe 'cloudkitty::db::mysql' do
|
|||||||
|
|
||||||
it { is_expected.to contain_openstacklib__db__mysql('cloudkitty').with(
|
it { is_expected.to contain_openstacklib__db__mysql('cloudkitty').with(
|
||||||
:user => 'cloudkitty',
|
:user => 'cloudkitty',
|
||||||
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
|
:password => 'cloudkittypass',
|
||||||
:dbname => 'cloudkitty',
|
:dbname => 'cloudkitty',
|
||||||
:host => '127.0.0.1',
|
:host => '127.0.0.1',
|
||||||
:charset => 'utf8',
|
:charset => 'utf8',
|
||||||
@@ -49,7 +49,7 @@ describe 'cloudkitty::db::mysql' do
|
|||||||
|
|
||||||
it { is_expected.to contain_openstacklib__db__mysql('cloudkitty').with(
|
it { is_expected.to contain_openstacklib__db__mysql('cloudkitty').with(
|
||||||
:user => 'cloudkitty',
|
:user => 'cloudkitty',
|
||||||
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
|
:password => 'cloudkittypass',
|
||||||
:dbname => 'cloudkitty',
|
:dbname => 'cloudkitty',
|
||||||
:host => '127.0.0.1',
|
:host => '127.0.0.1',
|
||||||
:charset => 'utf8',
|
:charset => 'utf8',
|
||||||
|
@@ -7,7 +7,7 @@ describe 'cloudkitty::db::postgresql' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :required_params do
|
let :required_params do
|
||||||
{ :password => 'pw' }
|
{ :password => 'cloudkittypass' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'cloudkitty-db-postgresql' do
|
shared_examples_for 'cloudkitty-db-postgresql' do
|
||||||
@@ -16,9 +16,12 @@ describe 'cloudkitty::db::postgresql' do
|
|||||||
required_params
|
required_params
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_postgresql__server__db('cloudkitty').with(
|
it { is_expected.to contain_openstacklib__db__postgresql('cloudkitty').with(
|
||||||
:user => 'cloudkitty',
|
:user => 'cloudkitty',
|
||||||
:password => 'md53482d86a9afd805efeb0f628944a7ecc'
|
:password => 'cloudkittypass',
|
||||||
|
:dbname => 'cloudkitty',
|
||||||
|
:encoding => nil,
|
||||||
|
:privileges => 'ALL',
|
||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user