summaryrefslogtreecommitdiff
path: root/code/environments/production/modules/certregen/lib/puppet/functions
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-15 21:52:01 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-15 21:52:01 +0100
commit77301e8a2accf45c1e9cd55b60e9caf720a20155 (patch)
treea63b8bd07590b0f0b3655f851ed3b1f65c5d2241 /code/environments/production/modules/certregen/lib/puppet/functions
parent40236de30e742094fa7e8fbaaac34995121f6466 (diff)
downloadpuppet.FWSECK-master.tar.gz
puppet.FWSECK-master.tar.bz2
puppet.FWSECK-master.zip
modules/: Add module certregen.HEADmaster
Diffstat (limited to 'code/environments/production/modules/certregen/lib/puppet/functions')
-rw-r--r--code/environments/production/modules/certregen/lib/puppet/functions/is_classified_with.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/code/environments/production/modules/certregen/lib/puppet/functions/is_classified_with.rb b/code/environments/production/modules/certregen/lib/puppet/functions/is_classified_with.rb
new file mode 100644
index 0000000..0f6d54b
--- /dev/null
+++ b/code/environments/production/modules/certregen/lib/puppet/functions/is_classified_with.rb
@@ -0,0 +1,9 @@
+Puppet::Functions.create_function(:is_classified_with) do
+ dispatch :is_classified_with do
+ param 'String', :str
+ end
+
+ def is_classified_with(str)
+ closure_scope.find_global_scope.compiler.node.classes.keys.include?(str.to_s)
+ end
+end