1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'manifests/ssh_authorized_key.pp', line 1
define amanda::ssh_authorized_key (
$key,
$ensure = present,
$type = undef,
$options = undef
) {
include amanda
include amanda::params
$default_type = 'rsa'
$default_options = [
'no-port-forwarding',
'no-X11-forwarding',
'no-agent-forwarding',
"command=\"${amanda::params::amandad_path} -auth=ssh amdump\"",
]
if $options != undef {
$options_real = $options
} else {
$options_real = $default_options
}
if $type != undef {
$type_real = $type
} else {
$type_real = $default_type
}
ssh_authorized_key { "${amanda::params::user}/${title}":
ensure => $ensure,
key => $key,
user => $amanda::params::user,
type => $type_real,
options => $options_real,
require => File["${amanda::params::homedir}/.ssh/authorized_keys"];
}
}
|