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: Ie6e0bd0ef7ab3793f97361b8e61a81ca1bd92cce
This commit is contained in:
parent
f7f4438cac
commit
1a02a99fc4
@ -49,7 +49,7 @@ class octavia::db::mysql(
|
||||
|
||||
::openstacklib::db::mysql { 'octavia':
|
||||
user => $user,
|
||||
password_hash => mysql::password($password),
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
host => $host,
|
||||
charset => $charset,
|
||||
|
@ -35,11 +35,11 @@ class octavia::db::postgresql(
|
||||
include octavia::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'octavia':
|
||||
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['octavia::db::begin']
|
||||
|
@ -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": ">=16.3.0 <17.0.0"
|
||||
|
@ -8,19 +8,19 @@ describe 'octavia::db::mysql' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:password => 'fooboozoo_default_password',
|
||||
:password => 'octaviapass',
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples 'octavia::db::mysql' do
|
||||
context 'with only required params' do
|
||||
it { should contain_openstacklib__db__mysql('octavia').with(
|
||||
:user => 'octavia',
|
||||
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
|
||||
:dbname => 'octavia',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
:user => 'octavia',
|
||||
:password => 'octaviapass',
|
||||
:dbname => 'octavia',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
)}
|
||||
end
|
||||
|
||||
@ -31,7 +31,7 @@ describe 'octavia::db::mysql' do
|
||||
|
||||
it { should contain_openstacklib__db__mysql('octavia').with(
|
||||
:user => 'octavia',
|
||||
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
|
||||
:password => 'octaviapass',
|
||||
:dbname => 'octavia',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
@ -47,7 +47,7 @@ describe 'octavia::db::mysql' do
|
||||
|
||||
it { should contain_openstacklib__db__mysql('octavia').with(
|
||||
:user => 'octavia',
|
||||
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
|
||||
:password => 'octaviapass',
|
||||
:dbname => 'octavia',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
|
@ -4,7 +4,7 @@ describe 'octavia::db::postgresql' do
|
||||
|
||||
shared_examples_for 'octavia::db::postgresql' do
|
||||
let :req_params do
|
||||
{ :password => 'pw' }
|
||||
{ :password => 'octaviapass' }
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
@ -16,9 +16,12 @@ describe 'octavia::db::postgresql' do
|
||||
req_params
|
||||
end
|
||||
|
||||
it { is_expected.to contain_postgresql__server__db('octavia').with(
|
||||
:user => 'octavia',
|
||||
:password => 'md534abd2692c9eda8e0a8f3cb322c18c08'
|
||||
it { is_expected.to contain_openstacklib__db__postgresql('octavia').with(
|
||||
:user => 'octavia',
|
||||
:password => 'octaviapass',
|
||||
:dbname => 'octavia',
|
||||
:encoding => nil,
|
||||
:privileges => 'ALL',
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user