summaryrefslogtreecommitdiff
path: root/code/environments/production/modules/certregen/lib/puppet/parser
diff options
context:
space:
mode:
Diffstat (limited to 'code/environments/production/modules/certregen/lib/puppet/parser')
-rw-r--r--code/environments/production/modules/certregen/lib/puppet/parser/functions/is_classified_with.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/code/environments/production/modules/certregen/lib/puppet/parser/functions/is_classified_with.rb b/code/environments/production/modules/certregen/lib/puppet/parser/functions/is_classified_with.rb
new file mode 100644
index 0000000..1e17887
--- /dev/null
+++ b/code/environments/production/modules/certregen/lib/puppet/parser/functions/is_classified_with.rb
@@ -0,0 +1,4 @@
+Puppet::Parser::Functions::newfunction(:is_classified_with, :arity => 1,
+ :type => :rvalue) do |(str)|
+ compiler.node.classes.keys.include?(str)
+end