-
Type:
Bug
-
Status: Resolved
-
Priority:
Normal
-
Resolution: Fixed
-
Affects Version/s: FACT 3.6.9, FACT 3.10.0
-
Fix Version/s: FACT 3.11.12, FACT 3.14.9
-
Component/s: None
-
Labels:None
-
Template:customfield_10700 240645
-
Team:Night's Watch
-
Story Points:2
-
Sprint:NW - 2020-03-04
-
Method Found:Needs Assessment
-
Zendesk Ticket IDs:35920
-
Zendesk Ticket Count:1
-
Release Notes:Bug Fix
-
Release Notes Summary:correctly displays ssh host key fact in the case the host key file does no contain a comment
-
QA Risk Assessment:Needs Assessment
If the SSH host public key file does not contain a comment, the public key will contain a trailing newline.
For example:
$ echo 'ssh-rsa public-key' >/etc/ssh/ssh_host_rsa_key.pub
|
$ facter ssh
|
{
|
rsa => {
|
key => "public-key
|
"
|
}
|
}
|
If the key contains a comment, we do not get the trailing newline:
$ echo 'ssh-rsa public-key comment' >/etc/ssh/ssh_host_rsa_key.pub
|
$ facter ssh
|
{
|
rsa => {
|
key => "public-key"
|
}
|
}
|
The trailing newline causes issues when using the resulting fact directly in a sshkey resource, where the trailing newline makes Puppet think the resource is changed on every run.