chore: testing a simple data_hash hiera plugin
testing testing ....
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'socket'
|
||||
|
||||
# Custom Hiera Plugin
|
||||
# This plugin returns static data for testing purposes
|
||||
Puppet::Functions.create_function(:'custom_hiera_plugin::data_hash') do
|
||||
# :reek:UtilityFunction
|
||||
def data_hash(_options, _context)
|
||||
# Return a simple hash with the required key-value pairs
|
||||
{
|
||||
'custom_hiera_plugin::var1' => 'foo',
|
||||
'custom_hiera_plugin::hostname' => Socket.gethostname
|
||||
}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user