Merge "Remove password hash generation in each puppet modules"
This commit is contained in:
commit
9a1b5dac6c
@ -65,7 +65,7 @@ class trove::db::mysql(
|
|||||||
|
|
||||||
::openstacklib::db::mysql { 'trove':
|
::openstacklib::db::mysql { 'trove':
|
||||||
user => $user,
|
user => $user,
|
||||||
password_hash => mysql::password($password),
|
password => $password,
|
||||||
dbname => $dbname,
|
dbname => $dbname,
|
||||||
host => $host,
|
host => $host,
|
||||||
charset => $charset,
|
charset => $charset,
|
||||||
|
@ -37,11 +37,11 @@ class trove::db::postgresql(
|
|||||||
validate_legacy(String, 'validate_string', $password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
::openstacklib::db::postgresql { 'trove':
|
::openstacklib::db::postgresql { 'trove':
|
||||||
password_hash => postgresql_password($user, $password),
|
password => $password,
|
||||||
dbname => $dbname,
|
dbname => $dbname,
|
||||||
user => $user,
|
user => $user,
|
||||||
encoding => $encoding,
|
encoding => $encoding,
|
||||||
privileges => $privileges,
|
privileges => $privileges,
|
||||||
}
|
}
|
||||||
|
|
||||||
Anchor['trove::db::begin']
|
Anchor['trove::db::begin']
|
||||||
|
@ -17,10 +17,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": "openstack/openstacklib",
|
"name": "openstack/openstacklib",
|
||||||
"version_requirement": ">=17.0.0 <18.0.0"
|
"version_requirement": ">=17.0.0 <18.0.0"
|
||||||
|
@ -27,12 +27,12 @@ describe 'trove::db::mysql' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :dbname => 'trove',
|
{ :dbname => 'trove',
|
||||||
:password => 's3cr3t',
|
:password => 'trovepass',
|
||||||
:user => 'trove',
|
:user => 'trove',
|
||||||
:charset => 'utf8',
|
:charset => 'utf8',
|
||||||
:collate => 'utf8_general_ci',
|
:collate => 'utf8_general_ci',
|
||||||
:host => '127.0.0.1',
|
:host => '127.0.0.1',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ describe 'trove::db::mysql' do
|
|||||||
is_expected.to contain_openstacklib__db__mysql('trove').with(
|
is_expected.to contain_openstacklib__db__mysql('trove').with(
|
||||||
:user => params[:user],
|
:user => params[:user],
|
||||||
:dbname => params[:dbname],
|
:dbname => params[:dbname],
|
||||||
:password_hash => '*58C036CDA51D8E8BBBBF2F9EA5ABF111ADA444F0',
|
:password => params[:password],
|
||||||
:host => params[:host],
|
:host => params[:host],
|
||||||
:charset => params[:charset]
|
:charset => params[:charset]
|
||||||
)
|
)
|
||||||
@ -56,7 +56,7 @@ describe 'trove::db::mysql' do
|
|||||||
context 'overriding allowed_hosts param to array' do
|
context 'overriding allowed_hosts param to array' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
:allowed_hosts => ['127.0.0.1','%']
|
:allowed_hosts => ['127.0.0.1','%']
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ describe 'trove::db::mysql' do
|
|||||||
is_expected.to contain_openstacklib__db__mysql('trove').with(
|
is_expected.to contain_openstacklib__db__mysql('trove').with(
|
||||||
:user => params[:user],
|
:user => params[:user],
|
||||||
:dbname => params[:dbname],
|
:dbname => params[:dbname],
|
||||||
:password_hash => '*58C036CDA51D8E8BBBBF2F9EA5ABF111ADA444F0',
|
:password => params[:password],
|
||||||
:host => params[:host],
|
:host => params[:host],
|
||||||
:charset => params[:charset],
|
:charset => params[:charset],
|
||||||
:allowed_hosts => ['127.0.0.1','%']
|
:allowed_hosts => ['127.0.0.1','%']
|
||||||
@ -82,7 +82,7 @@ describe 'trove::db::mysql' do
|
|||||||
is_expected.to contain_openstacklib__db__mysql('trove').with(
|
is_expected.to contain_openstacklib__db__mysql('trove').with(
|
||||||
:user => params[:user],
|
:user => params[:user],
|
||||||
:dbname => params[:dbname],
|
:dbname => params[:dbname],
|
||||||
:password_hash => '*58C036CDA51D8E8BBBBF2F9EA5ABF111ADA444F0',
|
:password => params[:password],
|
||||||
:host => params[:host],
|
:host => params[:host],
|
||||||
:charset => params[:charset],
|
:charset => params[:charset],
|
||||||
:allowed_hosts => '192.168.1.1'
|
:allowed_hosts => '192.168.1.1'
|
||||||
|
@ -4,7 +4,7 @@ describe 'trove::db::postgresql' do
|
|||||||
|
|
||||||
shared_examples_for 'trove::db::postgresql' do
|
shared_examples_for 'trove::db::postgresql' do
|
||||||
let :req_params do
|
let :req_params do
|
||||||
{ :password => 'pw' }
|
{ :password => 'trovepass' }
|
||||||
end
|
end
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
@ -16,9 +16,12 @@ describe 'trove::db::postgresql' do
|
|||||||
req_params
|
req_params
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_postgresql__server__db('trove').with(
|
it { is_expected.to contain_openstacklib__db__postgresql('trove').with(
|
||||||
:user => 'trove',
|
:user => 'trove',
|
||||||
:password => 'md5e12ef276d200761a0808f17a5b076451'
|
:password => 'trovepass',
|
||||||
|
:dbname => 'trove',
|
||||||
|
:encoding => nil,
|
||||||
|
:privileges => 'ALL',
|
||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user