Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
# This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
# The first commit's message is:

PUP-437 fix Puppet 4 compatibility

# This is the 2nd commit message:

PUP-437 add puppet_confdir fact
  • Loading branch information
aharden committed Oct 23, 2015
1 parent abfad2d commit 5fba4ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 7 additions & 0 deletions lib/facter/puppet_confdir.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'puppet'

Facter.add('puppet_confdir') do
setcode do
Puppet.settings['confdir']
end
end
8 changes: 1 addition & 7 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@
# Sample Usage:
#
class puppet_ent_agent::params {
if $::osfamily == 'windows' {
$appdata = regsubst($::common_appdata,'\\','/','G')
$config = "${appdata}/PuppetLabs/puppet/etc/puppet.conf"
}
else {
$config = '/etc/puppetlabs/puppet/puppet.conf'
}
$config = "${::puppet_confdir}/puppet.conf"
$ensure = 'present'
$master = $::settings::server
$agent_server = undef
Expand Down

0 comments on commit 5fba4ec

Please sign in to comment.