Skip to content

Commit

Permalink
Add compliance_engine::enforcement lookup_key function
Browse files Browse the repository at this point in the history
Fixes simp#33
  • Loading branch information
silug committed Jan 7, 2025
1 parent 5806b18 commit a49e0b1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/puppet/functions/compliance_engine/enforcement.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

# @summary Hiera entry point for Compliance Engine
Puppet::Functions.create_function(:'compliance_engine::enforcement') do
# @param key String The key to lookup in the Hiera data
# @return [String] The value of the key in the Hiera data
dispatch :enforcement do
param 'String[1]', :key
param 'Hash[String[1], Any]', :options
param 'Puppet::LookupContext', :context
end

require 'compliance_engine/data'

def enforcement(key, options, context)
require 'pry-byebug'; binding.pry
# hiera(key)
end
end

0 comments on commit a49e0b1

Please # to comment.