Set show_diff to false for Nova SSH private key

The private key is currently being leaked into
the diff output.

Change-Id: I94170f76257c77d1eabeeb3d373c05c50413c53d
This commit is contained in:
Tobias Urdin 2024-04-08 11:42:58 +02:00
parent 83c9e4b17b
commit 75fbe61987
2 changed files with 12 additions and 10 deletions

View File

@ -552,6 +552,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa, ssh-ed25519.")
mode => '0600',
owner => $::nova::params::user,
group => $::nova::params::group,
show_diff => false,
require => File['/var/lib/nova/.ssh'],
}
}

View File

@ -360,6 +360,7 @@ describe 'nova' do
:mode => '0600',
:owner => 'nova',
:group => 'nova',
:show_diff => false,
)
end
end
@ -375,7 +376,7 @@ describe 'nova' do
it 'should raise an error' do
expect {
is_expected.to contain_file('/var/lib/nova/.ssh/id_rsa').with(
:content => 'keydata'
:content => 'keydata',
)
}.to raise_error Puppet::Error, /You must provide both a key type and key data./
end