Skip to content

Commit 9f38cce

Browse files
binford2kbastelfreak
authored andcommitted
Move implementation fact to an API method
This will allow various plugins to access this information more easily if needed.
1 parent da7d6dd commit 9f38cce

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

lib/puppet/node/facts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def save(instance, key = nil, options={})
2727
attr_accessor :name, :values, :timestamp
2828

2929
def add_local_facts
30-
values["implementation"] = "openvox"
30+
values["implementation"] = Puppet.implementation
3131
values["clientcert"] = Puppet.settings[:certname]
3232
values["clientversion"] = Puppet.version.to_s
3333
values["clientnoop"] = Puppet.settings[:noop]

lib/puppet/node/server_facts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def self.load
55
server_facts = {}
66

77
# Add implementation information
8-
server_facts["implementation"] = "openvox"
8+
server_facts["implementation"] = Puppet.implementation
99

1010
# Add our server Puppet Enterprise version, if available.
1111
pe_version_file = '/opt/puppetlabs/server/pe_version'

lib/puppet/version.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
module Puppet
99
PUPPETVERSION = '7.36.1'
10+
IMPLEMENTATION = 'openvox'
1011

1112
##
1213
# version is a public API method intended to always provide a fast and
@@ -73,6 +74,10 @@ def self.version=(version)
7374
@puppet_version = version
7475
end
7576

77+
def self.implementation
78+
IMPLEMENTATION
79+
end
80+
7681
##
7782
# read_version_file reads the content of the "VERSION" file that lives in the
7883
# same directory as this source code file.

0 commit comments

Comments
 (0)