diff --git a/manifests/ssh.pp b/manifests/ssh.pp index f7da0e1e46736d0c9a69e935b93a2c9a7206b64a..b459919be9bd7cabbe4d2615f6cddaf6530b9c9f 100644 --- a/manifests/ssh.pp +++ b/manifests/ssh.pp @@ -45,7 +45,7 @@ # If you set this to true you should also set $pubkey to true. # # Example: -# root_authorized_keys => template('mymodule/root/.ssh/authorized_keys.erb'), +# root_authorized_keys => 'mymodule/root/.ssh/authorized_keys.erb', # # Default: undef @@ -138,7 +138,7 @@ class base::ssh( if ($root_authorized_keys) { file { '/root/.ssh/authorized_keys': ensure => present, - content => $root_authorized_keys, + content => template($root_authorized_keys), mode => '0640', } } else { diff --git a/manifests/ssh/config/sshd.pp b/manifests/ssh/config/sshd.pp index 918b1e1d6749fcd5a35eb816ed8e02a413def954..2c408d0d28f74be29b8832d168424d5999099965 100644 --- a/manifests/ssh/config/sshd.pp +++ b/manifests/ssh/config/sshd.pp @@ -34,19 +34,19 @@ define base::ssh::config::sshd( $hostbased = false, $pubkey = false, $password = true, - $content = undef, $source = undef, + $template_path = undef, $max_tries = 5, $listen_addresses = 'all', $listen_ports = '22', $rootloginwithpswd = 'no', $pam_duo = false, ) { - if $source { + if ($source) { $template = undef } else { - if $content { - $template = $content + if ($template_path) { + $template = template($template_path) } else { $template = template('base/ssh/sshd_config.erb') }