From 63f1c52d8b192691be477b6996d9bf27a5e63d29 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 1 Oct 2012 11:05:25 -0700 Subject: [PATCH] Add condition to detect PE installations and provide different parameters --- manifests/params.pp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 20287a9..48a960c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -46,12 +46,21 @@ class puppetdb::params { } } - # TODO: need to condition this for PE - $puppetdb_package = 'puppetdb' - $puppetdb_service = 'puppetdb' - $confdir = '/etc/puppetdb/conf.d' - $puppet_service_name = 'puppetmaster' - $puppet_confdir = '/etc/puppet' + if $::puppetversion =~ /Puppet Enterprise/ { + $puppetdb_package = 'pe-puppetdb' + $puppetdb_service = 'pe-puppetdb' + $confdir = '/etc/puppetlabs/puppetdb/conf.d' + $puppet_service_name = 'pe-httpd' + $puppet_confdir = '/etc/puppetlabs/puppet' + $terminus_package = 'pe-puppetdb-terminus' + } else { + $puppetdb_package = 'puppetdb' + $puppetdb_service = 'puppetdb' + $confdir = '/etc/puppetdb/conf.d' + $puppet_service_name = 'puppetmaster' + $puppet_confdir = '/etc/puppet' + $terminus_package = 'puppetdb-terminus' + } + $puppet_conf = "${puppet_confdir}/puppet.conf" - $terminus_package = 'puppetdb-terminus' }