Merge "Ensure novajoin's log directory ownership is correct"

This commit is contained in:
Jenkins 2017-09-07 10:22:00 +00:00 committed by Gerrit Code Review
commit d4fa5df58b
2 changed files with 14 additions and 0 deletions

View File

@ -173,6 +173,13 @@ class nova::metadata::novajoin::api (
tag => ['openstack', 'novajoin-package'],
}
file { '/var/log/novajoin':
ensure => directory,
owner => $service_user,
group => $service_user,
recurse => true,
}
if $ipa_domain != undef {
novajoin_config {
'DEFAULT/domain': value => $ipa_domain;

View File

@ -136,6 +136,13 @@ describe 'nova::metadata::novajoin::api' do
)
end
it { is_expected.to contain_file("/var/log/novajoin").with(
'ensure' => 'directory',
'owner' => "#{param_hash[:service_user]}",
'group' => "#{param_hash[:service_user]}",
'recurse' => true
)}
it { is_expected.to contain_file("#{param_hash[:keytab]}").with(
'owner' => "#{param_hash[:service_user]}",
'require' => 'Exec[get-service-user-keytab]',