From 5eb478da956ca37a0332e2e1c32f6806f927b654 Mon Sep 17 00:00:00 2001 From: Thomas Eckert Date: Tue, 31 Oct 2017 07:56:25 +0100 Subject: [PATCH] Add messaging to __ssh_authorized_key. (#590) --- cdist/conf/type/__ssh_authorized_key/gencode-remote | 2 ++ cdist/conf/type/__ssh_authorized_key/man.rst | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/cdist/conf/type/__ssh_authorized_key/gencode-remote b/cdist/conf/type/__ssh_authorized_key/gencode-remote index 0ce41ea6..7ded7dc6 100755 --- a/cdist/conf/type/__ssh_authorized_key/gencode-remote +++ b/cdist/conf/type/__ssh_authorized_key/gencode-remote @@ -111,8 +111,10 @@ fi case "$state_should" in present) add_line "$file" "$entry" + echo "added to $file ($entry)" >> "$__messages_out" ;; absent) remove_line "$file" "$entry" + echo "removed from $file ($entry)" >> "$__messages_out" ;; esac diff --git a/cdist/conf/type/__ssh_authorized_key/man.rst b/cdist/conf/type/__ssh_authorized_key/man.rst index b58ad879..087a3dae 100644 --- a/cdist/conf/type/__ssh_authorized_key/man.rst +++ b/cdist/conf/type/__ssh_authorized_key/man.rst @@ -36,6 +36,15 @@ state if the given keys should be 'present' or 'absent', defaults to 'present'. +MESSAGES +-------- +added to `file` (`entry`) + The key `entry` (with optional comment) was added to `file`. + +removed from `file` (`entry`) + The key `entry` (with optional comment) was removed from `file`. + + EXAMPLES --------