diff --git a/manifests/init.pp b/manifests/init.pp index 72dd6e0b9..ddfa3eafc 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -551,11 +551,12 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") } file { $nova_private_key_file: - content => $nova_private_key[key], - mode => '0600', - owner => $::nova::params::user, - group => $::nova::params::group, - require => File['/var/lib/nova/.ssh'], + content => $nova_private_key[key], + mode => '0600', + owner => $::nova::params::user, + group => $::nova::params::group, + show_diff => false, + require => File['/var/lib/nova/.ssh'], } } } diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index 25630757a..7693af2c5 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -344,7 +344,8 @@ describe 'nova' do it 'should install ssh private key' do is_expected.to contain_file('/var/lib/nova/.ssh/id_rsa').with( - :content => 'keydata' + :content => 'keydata', + :show_diff => false, ) end end @@ -359,7 +360,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