Skip to content

Commit a93ee77

Browse files
authored
Merge pull request #78 from binford2k/add_implementation_api
Move implementation fact to an API method
2 parents 8305ef6 + 9d857ed commit a93ee77

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
@@ -28,7 +28,7 @@ def save(instance, key = nil, options = {})
2828
attr_accessor :name, :values, :timestamp
2929

3030
def add_local_facts
31-
values["implementation"] = "openvox"
31+
values["implementation"] = Puppet.implementation
3232
values["clientcert"] = Puppet.settings[:certname]
3333
values["clientversion"] = Puppet.version.to_s
3434
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
@@ -9,6 +9,7 @@
99

1010
module Puppet
1111
PUPPETVERSION = '8.18.1'
12+
IMPLEMENTATION = 'openvox'
1213

1314
##
1415
# version is a public API method intended to always provide a fast and
@@ -76,6 +77,10 @@ def self.version=(version)
7677
@puppet_version = version
7778
end
7879

80+
def self.implementation
81+
IMPLEMENTATION
82+
end
83+
7984
##
8085
# read_version_file reads the content of the "VERSION" file that lives in the
8186
# same directory as this source code file.

0 commit comments

Comments
 (0)