) inherits base_installation {
ensure_packages('ruby-shadow')
user { 'root':
- password => '!'
+ password => '!',
+ purge_ssh_keys => ["/root/.ssh/authorized_keys"],
}
class { 'sudo':
type => $key[key_type],
key => $key[key],
}
+
+ if has_key($key, "root_command") {
+ ssh_authorized_key { "${user[username]}@${key[host]}:root":
+ name => "${user[username]}@${key[host]}:root",
+ user => "root",
+ options => [
+ "command=\"${key[root_command]}\"",
+ "no-port-forwarding",
+ "no-X11-forwarding",
+ "no-pty",
+ ],
+ type => $key[key_type],
+ key => $key[key],
+ }
+ }
}
}
}