diff --git a/cdist/conf/type/__ssh_authorized_key/explorer/entry b/cdist/conf/type/__ssh_authorized_key/explorer/entry index 78031ab5..40ee0cb9 100755 --- a/cdist/conf/type/__ssh_authorized_key/explorer/entry +++ b/cdist/conf/type/__ssh_authorized_key/explorer/entry @@ -23,4 +23,4 @@ type_and_key="$(cat "$__object/parameter/key" | tr ' ' '\n' | awk '/^(ssh|ecdsa) file="$(cat $__object/parameter/file)" # get any entries that match the type and key -grep ".*$type_and_key[ \n]" "$file" || true +grep ".*$type_and_key\([ \n]\|$\)" "$file" || true diff --git a/docs/changelog b/docs/changelog index b1c7a100..2d954c29 100644 --- a/docs/changelog +++ b/docs/changelog @@ -10,6 +10,7 @@ next: * Type __user_groups: Support OpenBSD (Philippe Gregoire) * Type __hostname: Allow hostnamectl to fail silently (Steven Armstrong) * Type __install_config: Use default default __remote_{copy,exec} in custom __remote_{copy,exec} scripts (Steven Armstrong) + * Type __ssh_authorized_key: Fix removing ssh key that is last one in the file (Darko Poljak) 4.6.0: 2017-08-25 * Core: Add inventory functionality (Darko Poljak)