From b77e24693b6c842567234b95b182986d6ba38080 Mon Sep 17 00:00:00 2001
From: Adam Henry Lewenberg <adamhl@stanford.edu>
Date: Fri, 16 Jun 2017 10:14:33 -0700
Subject: [PATCH] ssh: fix errors in template path

---
 manifests/ssh.pp             | 4 ++--
 manifests/ssh/config/sshd.pp | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/manifests/ssh.pp b/manifests/ssh.pp
index f7da0e1..b459919 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 918b1e1..2c408d0 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')
     }
-- 
GitLab