From 8d14785b3055d7d63cbc45675b56089289a4c319 Mon Sep 17 00:00:00 2001
From: Jonathan Lent <jlent@stanford.edu>
Date: Mon, 11 Jan 2016 09:22:30 -0800
Subject: [PATCH] [puppetclient] Stripping special treatment for Puppet 2.X
 hosts

---
 NEWS                             |  3 +-
 manifests/puppetclient/config.pp | 54 ++++----------------------------
 2 files changed, 8 insertions(+), 49 deletions(-)

diff --git a/NEWS b/NEWS
index acc7351..e54ab41 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
-UNRELEASED
+release/004.057 (2016-01-11)
 
+    [puppetclient] strip special treatment for Puppet 2.X hosts (jlent)
     [pam] Stop overriding common PAM files with Debian jessie. (akkornel)
     [ssh] Misc. filter-syslog cleanups. (akkornel)
 
diff --git a/manifests/puppetclient/config.pp b/manifests/puppetclient/config.pp
index 42f8ce1..f249885 100644
--- a/manifests/puppetclient/config.pp
+++ b/manifests/puppetclient/config.pp
@@ -38,55 +38,13 @@ define base::puppetclient::config(
         # The Puppet config file
         $puppet_config = '/etc/puppet/puppet.conf'
 
-        if ($::hostname =~ /jimhenson|frankoz/) {
-          # CASE 1. Puppet 2.x
-
-          # The file /etc/puppet/puppet.conf is constructed by first writing
-          # the ERB template file templates/puppet.conf.template.erb into
-          # /etc/puppet/puppet.conf.template.
-          #
-          # We then convert /etc/puppet/puppet.conf.template into
-          # /etc/puppet/puppet.conf using generate_conf.
-          #
-          # Note that for generate-conf to work we must have the database ini
-          # file in place.
-
-          # Puppet masters need the database credentials file, so download
-          # the wallet object.
-          include base::puppetclient::db_credentials
-
-          $template_file = '/etc/puppet/puppet.conf.template'
-          $db_config     = $puppetclient::db_credentials::puppet_db_ini_file
-
-          # 1. Install the template file.
-          file { $template_file:
-            content => template('base/puppetclient/puppet.conf.template.erb'),
-            mode    => '0644',
-            owner   => 'root',
-            group   => 'root',
-          }
-
-          # 2. Convert the template file into /etc/puppet/puppet.conf.
-          exec { 'generate-conf puppet.conf':
-            command     =>
-              "generate-conf --template ${template_file} --config ${db_config} --newfile ${puppet_config}",
-            refreshonly => true,
-            subscribe   =>
-              [
-                File[$template_file],
-                Base::Wallet[$puppetclient::db_credentials::credentials_wallet_name],
-              ]
-          }
-        } else {
-          # CASE 2. Puppet 3.x
-
-          file { $puppet_config:
-            content => template('base/puppetclient/puppet.conf.template.erb'),
-            mode    => '0644',
-            owner   => 'root',
-            group   => 'root',
-          }
+        file { $puppet_config:
+          content => template('base/puppetclient/puppet.conf.template.erb'),
+          mode    => '0644',
+          owner   => 'root',
+          group   => 'root',
         }
+
       } else {
         # not $is_master
         file { $name:
-- 
GitLab