[MODULES-7605] The ssh_authorized_key resource should trim trailing newlines Created: 2014/08/29  Updated: 2018/08/21

Status: Accepted
Project: Modules
Component/s: sshkeys_core
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: William Van Hevelingen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Easy, ssh, ssh_authorized_key, type_and_provider
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Team: Platform OS

 Description   

The "Key must not contain whitespace" error is incredibly frustrating. Puppet should just remove trailing newlines from the key parameter because when you go to replace the keys in Hiera vim helpfully adds a new line character.

A really gross work-around is to do this:

key    => regsubst(hiera('ssh_key'), '\n$', '');


Generated at Sat Jan 25 00:08:05 PST 2020 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.