Set show_diff to false for Nova SSH private key
The private key is currently being leaked into the diff output. Conflicts: spec/classes/nova_init_spec.rb Change-Id: I94170f76257c77d1eabeeb3d373c05c50413c53d (cherry picked from commit75fbe61987
) (cherry picked from commit90af39c480
) (cherry picked from commit36951d35cd
)
This commit is contained in:
parent
997172e801
commit
4dc8cb1f29
|
@ -551,11 +551,12 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
|
||||||
}
|
}
|
||||||
|
|
||||||
file { $nova_private_key_file:
|
file { $nova_private_key_file:
|
||||||
content => $nova_private_key[key],
|
content => $nova_private_key[key],
|
||||||
mode => '0600',
|
mode => '0600',
|
||||||
owner => $::nova::params::user,
|
owner => $::nova::params::user,
|
||||||
group => $::nova::params::group,
|
group => $::nova::params::group,
|
||||||
require => File['/var/lib/nova/.ssh'],
|
show_diff => false,
|
||||||
|
require => File['/var/lib/nova/.ssh'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -344,7 +344,8 @@ describe 'nova' do
|
||||||
|
|
||||||
it 'should install ssh private key' do
|
it 'should install ssh private key' do
|
||||||
is_expected.to contain_file('/var/lib/nova/.ssh/id_rsa').with(
|
is_expected.to contain_file('/var/lib/nova/.ssh/id_rsa').with(
|
||||||
:content => 'keydata'
|
:content => 'keydata',
|
||||||
|
:show_diff => false,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -359,7 +360,7 @@ describe 'nova' do
|
||||||
it 'should raise an error' do
|
it 'should raise an error' do
|
||||||
expect {
|
expect {
|
||||||
is_expected.to contain_file('/var/lib/nova/.ssh/id_rsa').with(
|
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./
|
}.to raise_error Puppet::Error, /You must provide both a key type and key data./
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue