Skip to content

Use $is_pe for PE determination#122

Merged
kbarber merged 2 commits intopuppetlabs:masterfrom
reidmv:use_is_pe
Feb 25, 2014
Merged

Use $is_pe for PE determination#122
kbarber merged 2 commits intopuppetlabs:masterfrom
reidmv:use_is_pe

Conversation

@reidmv
Copy link
Copy Markdown
Contributor

@reidmv reidmv commented Feb 25, 2014

...rather than the custom logic that was used previously. Using a uniform canon fact across all modules that need to differentiate between PE and POSS makes unusual situations (such as having a missing /opt/puppet/pe_version file) more, well, uniform.

...rather than the custom logic that was used previously. Using a
uniform canon fact across all modules that need to differentiate between
PE and POSS makes unusual situations (such as having a missing
/opt/puppet/pe_version file) more, well, uniform.
The is_pe fact was first defined in stdlib in 3.1.0. We want to use that
fact for making the "PE or Not PE" determination in params, so we need
to require a stdlib at least that new. Note that at the time of commit
the current version of stdlib is 4.1.0, so we're not exactly requiring
bleeding edge.
kbarber added a commit that referenced this pull request Feb 25, 2014
Use $is_pe for PE determination
@kbarber kbarber merged commit cdc40c6 into puppetlabs:master Feb 25, 2014
@raphink
Copy link
Copy Markdown

raphink commented Mar 5, 2014

Just a little issue:

  • all facts are strings (sadly)
  • the 'false' string is true on Puppet

My machine now wants to manage /etc/init.d/pe-puppetdb on an open-source edition…

@kbarber
Copy link
Copy Markdown
Contributor

kbarber commented Mar 5, 2014

@raphink I know I know, there is a PR on this :-). Stop using master!

@raphink
Copy link
Copy Markdown

raphink commented Mar 5, 2014

I was just preparing a PR now:

diff --git a/manifests/params.pp b/manifests/params.pp
index e85de90..0f98ab7 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -50,7 +50,7 @@ class puppetdb::params {
     }
   }

-  if $::is_pe {
+  if str2bool($::is_pe) {
     $puppetdb_package     = 'pe-puppetdb'
     $puppetdb_service     = 'pe-puppetdb'
     $confdir              = '/etc/puppetlabs/puppetdb/conf.d'

If I stop using master, I won't send new PRs ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants