Skip to content

Commit a49e0b1

Browse files
committed
Add compliance_engine::enforcement lookup_key function
Fixes #33
1 parent 5806b18 commit a49e0b1

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# frozen_string_literal: true
2+
3+
# @summary Hiera entry point for Compliance Engine
4+
Puppet::Functions.create_function(:'compliance_engine::enforcement') do
5+
# @param key String The key to lookup in the Hiera data
6+
# @return [String] The value of the key in the Hiera data
7+
dispatch :enforcement do
8+
param 'String[1]', :key
9+
param 'Hash[String[1], Any]', :options
10+
param 'Puppet::LookupContext', :context
11+
end
12+
13+
require 'compliance_engine/data'
14+
15+
def enforcement(key, options, context)
16+
require 'pry-byebug'; binding.pry
17+
# hiera(key)
18+
end
19+
end

0 commit comments

Comments
 (0)