Skip to content
Snippets Groups Projects
Verified Commit b77e2469 authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

ssh: fix errors in template path

parent 78926682
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
# If you set this to true you should also set $pubkey to true. # If you set this to true you should also set $pubkey to true.
# #
# Example: # Example:
# root_authorized_keys => template('mymodule/root/.ssh/authorized_keys.erb'), # root_authorized_keys => 'mymodule/root/.ssh/authorized_keys.erb',
# #
# Default: undef # Default: undef
...@@ -138,7 +138,7 @@ class base::ssh( ...@@ -138,7 +138,7 @@ class base::ssh(
if ($root_authorized_keys) { if ($root_authorized_keys) {
file { '/root/.ssh/authorized_keys': file { '/root/.ssh/authorized_keys':
ensure => present, ensure => present,
content => $root_authorized_keys, content => template($root_authorized_keys),
mode => '0640', mode => '0640',
} }
} else { } else {
......
...@@ -34,19 +34,19 @@ define base::ssh::config::sshd( ...@@ -34,19 +34,19 @@ define base::ssh::config::sshd(
$hostbased = false, $hostbased = false,
$pubkey = false, $pubkey = false,
$password = true, $password = true,
$content = undef,
$source = undef, $source = undef,
$template_path = undef,
$max_tries = 5, $max_tries = 5,
$listen_addresses = 'all', $listen_addresses = 'all',
$listen_ports = '22', $listen_ports = '22',
$rootloginwithpswd = 'no', $rootloginwithpswd = 'no',
$pam_duo = false, $pam_duo = false,
) { ) {
if $source { if ($source) {
$template = undef $template = undef
} else { } else {
if $content { if ($template_path) {
$template = $content $template = template($template_path)
} else { } else {
$template = template('base/ssh/sshd_config.erb') $template = template('base/ssh/sshd_config.erb')
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment