From fbcdb16d890d7a9c84532cf29e87d3b76a26ed58 Mon Sep 17 00:00:00 2001 From: Roman Mueller Date: Tue, 21 Apr 2015 17:58:48 +0200 Subject: [PATCH] Initial support for puppetserver 2.0.0 paths --- files/lenses/trapperkeeper.aug | 2 +- manifests/config/puppetserver.pp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/files/lenses/trapperkeeper.aug b/files/lenses/trapperkeeper.aug index fc848a7..e86322c 100644 --- a/files/lenses/trapperkeeper.aug +++ b/files/lenses/trapperkeeper.aug @@ -117,7 +117,7 @@ let rec entry = hash (entry|simple|array) let lns = (empty|comment)* . (entry . (empty|comment)*)* (* Variable: filter *) -let filter = incl "/etc/puppetserver/conf.d/*" +let filter = incl "/etc/puppetserver/conf.d/*" . incl "/etc/puppetlabs/puppetserver/conf.d/*" . Util.stdexcl let xfm = transform lns filter diff --git a/manifests/config/puppetserver.pp b/manifests/config/puppetserver.pp index ea252da..c3ea391 100644 --- a/manifests/config/puppetserver.pp +++ b/manifests/config/puppetserver.pp @@ -4,7 +4,11 @@ ) { require ::puppetserver::augeas - $targetdir = '/etc/puppetserver/conf.d' + if versioncmp($::puppetversion, '4.0.0') >= 0 { + $targetdir = '/etc/puppetlabs/puppetserver/conf.d' + } else { + $targetdir = '/etc/puppetserver/conf.d' + } $target = "/files${targetdir}/${name}" case $ensure {