Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Initial support for puppetserver 2.0.0 paths #8

Merged
merged 1 commit into from
Jul 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/lenses/trapperkeeper.aug
Original file line number Diff line number Diff line change
Expand Up @@ -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/*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just put that on a next line for readability?

. Util.stdexcl

let xfm = transform lns filter
6 changes: 5 additions & 1 deletion manifests/config/puppetserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
) {
require ::puppetserver::augeas

$targetdir = '/etc/puppetserver/conf.d'
if versioncmp($::puppetversion, '4.0.0') >= 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this is linked to $::puppetversion

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raphink Well, see my initial comment in the PR.
It's not linked, but I don't know a better way to make the decision here, there is no $::puppetserverversion...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this module would be a proper place to ship such a fact then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raphink I guess it's safe to admit that if puppetversion >= 4.0.0 than we use puppetserver 2.x, so I'm not sure that we need (yet) another fact which will not be available at first run.

$targetdir = '/etc/puppetlabs/puppetserver/conf.d'
} else {
$targetdir = '/etc/puppetserver/conf.d'
}
$target = "/files${targetdir}/${name}"

case $ensure {
Expand Down