Puppet Function: validate_ensure

Defined in:
modules/wmflib/lib/puppet/parser/functions/validate_ensure.rb
Function type:
Ruby 3.x API

Overview

validate_ensure()Any

Returns:

  • (Any)


11
12
13
14
15
# File 'modules/wmflib/lib/puppet/parser/functions/validate_ensure.rb', line 11

newfunction(:validate_ensure, :arity => 1) do |args|
  unless %w(present absent).include?(args.first)
    fail(Puppet::ParseError, "$ensure must be \"present\" or \"absent\" (got: #{args.first.inspect}).")
  end
end