aboutsummaryrefslogtreecommitdiff
path: root/manifests/ssh_authorized_key.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/ssh_authorized_key.pp')
-rw-r--r--manifests/ssh_authorized_key.pp6
1 files changed, 5 insertions, 1 deletions
diff --git a/manifests/ssh_authorized_key.pp b/manifests/ssh_authorized_key.pp
index 9706018..bf188d8 100644
--- a/manifests/ssh_authorized_key.pp
+++ b/manifests/ssh_authorized_key.pp
@@ -2,12 +2,16 @@
define sshd::ssh_authorized_key(
$ensure = 'present',
$type = 'ssh-dss',
- $key,
+ $key = 'absent',
$user = 'root',
$target = undef,
$options = 'absent'
){
+ if ($ensure=='present') and ($key=='absent') {
+ fail("You have to set \$key for Sshd::Ssh_authorized_key[${name}]!")
+ }
+
$real_user = $user ? {
false => $name,
'' => $name,