projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
040032b
)
authorized_key_add: allow undef value for key
author
Peter Palfrader
<peter@palfrader.org>
Mon, 9 Sep 2019 20:19:20 +0000
(22:19 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Mon, 9 Sep 2019 20:19:56 +0000
(22:19 +0200)
modules/ssh/manifests/authorized_key_add.pp
patch
|
blob
|
history
diff --git
a/modules/ssh/manifests/authorized_key_add.pp
b/modules/ssh/manifests/authorized_key_add.pp
index
2165b0f
..
122a392
100644
(file)
--- a/
modules/ssh/manifests/authorized_key_add.pp
+++ b/
modules/ssh/manifests/authorized_key_add.pp
@@
-4,14
+4,14
@@
define ssh::authorized_key_add(
String $target_user,
String $command,
-
String
$key,
+
Variant[String, Undef]
$key,
Variant[Array[String], String] $collect_tag,
String $restrict = 'restrict',
Array[Stdlib::IP::Address] $from_hosts = $base::public_addresses,
) {
$from = $from_hosts.join(',')
- if (size(split($key, "\n")) > 1) {
+ if (
$key and
size(split($key, "\n")) > 1) {
fail('More than one line in key for ssh::authorized_key')
}
if (size(split($command, '"')) > 1) {